home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: prgrmmrg.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 5b 74 |\documen|tstyle[t|
|00000010| 69 6d 65 73 2c 66 75 6c | 6c 70 61 67 65 5d 7b 61 |imes,ful|lpage]{a|
|00000020| 72 74 69 63 6c 65 7d 0a | 5c 6e 65 77 63 6f 6d 6d |rticle}.|\newcomm|
|00000030| 61 6e 64 7b 5c 6d 61 65 | 7d 7b 7b 5c 62 66 20 4d |and{\mae|}{{\bf M|
|00000040| 41 45 73 74 72 6f 5c 20 | 7d 7d 0a 5c 74 69 74 6c |AEstro\ |}}.\titl|
|00000050| 65 20 7b 56 69 64 65 6f | 20 4f 62 6a 65 63 74 20 |e {Video| Object |
|00000060| 2d 2d 2d 20 41 20 4c 69 | 62 72 61 72 79 20 66 6f |--- A Li|brary fo|
|00000070| 72 20 43 6f 6e 74 72 6f | 6c 6c 69 6e 67 20 56 69 |r Contro|lling Vi|
|00000080| 64 65 6f 20 44 65 76 69 | 63 65 73 7d 0a 5c 61 75 |deo Devi|ces}.\au|
|00000090| 74 68 6f 72 7b 57 65 65 | 20 4c 65 65 20 4c 69 6d |thor{Wee| Lee Lim|
|000000a0| 5c 5c 0a 47 65 6f 72 67 | 65 20 44 2e 20 44 72 61 |\\.Georg|e D. Dra|
|000000b0| 70 65 61 75 5c 5c 0a 5c | 6d 61 65 20 50 72 6f 6a |peau\\.\|mae Proj|
|000000c0| 65 63 74 5c 5c 0a 53 74 | 61 6e 66 6f 72 64 20 55 |ect\\.St|anford U|
|000000d0| 6e 69 76 65 72 73 69 74 | 79 5c 5c 0a 6d 61 65 73 |niversit|y\\.maes|
|000000e0| 74 72 6f 40 73 69 6f 75 | 78 2e 73 74 61 6e 66 6f |tro@siou|x.stanfo|
|000000f0| 72 64 2e 65 64 75 7d 0a | 5c 62 65 67 69 6e 7b 64 |rd.edu}.|\begin{d|
|00000100| 6f 63 75 6d 65 6e 74 7d | 0a 0a 5c 62 65 67 69 6e |ocument}|..\begin|
|00000110| 7b 74 69 74 6c 65 70 61 | 67 65 7d 0a 5c 6d 61 6b |{titlepa|ge}.\mak|
|00000120| 65 74 69 74 6c 65 0a 5c | 65 6e 64 7b 74 69 74 6c |etitle.\|end{titl|
|00000130| 65 70 61 67 65 7d 0a 0a | 5c 74 61 62 6c 65 6f 66 |epage}..|\tableof|
|00000140| 63 6f 6e 74 65 6e 74 73 | 0a 0a 5c 6e 65 77 70 61 |contents|..\newpa|
|00000150| 67 65 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 49 6e 74 |ge..\sec|tion{Int|
|00000160| 72 6f 64 75 63 74 69 6f | 6e 7d 0a 0a 46 6f 72 20 |roductio|n}..For |
|00000170| 61 20 73 69 6e 67 6c 65 | 20 61 70 70 6c 69 63 61 |a single| applica|
|00000180| 74 69 6f 6e 20 74 6f 20 | 70 72 6f 76 69 64 65 20 |tion to |provide |
|00000190| 73 75 70 70 6f 72 74 20 | 66 6f 72 20 61 20 76 61 |support |for a va|
|000001a0| 72 69 65 74 79 20 6f 66 | 0a 63 6f 6d 70 75 74 65 |riety of|.compute|
|000001b0| 72 2d 63 6f 6e 74 72 6f | 6c 6c 65 64 20 76 69 64 |r-contro|lled vid|
|000001c0| 65 6f 64 69 73 63 20 61 | 6e 64 20 76 69 64 65 6f |eodisc a|nd video|
|000001d0| 74 61 70 65 20 70 6c 61 | 79 65 72 73 2c 20 74 68 |tape pla|yers, th|
|000001e0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0a 6e 65 |e applic|ation.ne|
|000001f0| 65 64 73 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 73 |eds to i|nclude s|
|00000200| 65 72 69 61 6c 2d 6c 69 | 6e 65 20 64 72 69 76 65 |erial-li|ne drive|
|00000210| 72 73 20 66 6f 72 20 61 | 20 70 6f 74 65 6e 74 69 |rs for a| potenti|
|00000220| 61 6c 6c 79 20 6c 61 72 | 67 65 20 6e 75 6d 62 65 |ally lar|ge numbe|
|00000230| 72 20 6f 66 0a 74 68 6f | 73 65 20 64 65 76 69 63 |r of.tho|se devic|
|00000240| 65 73 2e 20 20 46 6f 72 | 20 74 68 69 73 20 70 75 |es. For| this pu|
|00000250| 72 70 6f 73 65 2c 20 77 | 65 20 68 61 76 65 20 63 |rpose, w|e have c|
|00000260| 72 65 61 74 65 64 20 61 | 20 67 65 6e 65 72 69 63 |reated a| generic|
|00000270| 20 22 56 69 64 65 6f 0a | 4f 62 6a 65 63 74 22 20 | "Video.|Object" |
|00000280| 74 68 61 74 20 73 75 70 | 70 6f 72 74 73 20 66 65 |that sup|ports fe|
|00000290| 61 74 75 72 65 73 20 63 | 6f 6d 6d 6f 6e 20 74 6f |atures c|ommon to|
|000002a0| 20 61 20 6e 75 6d 62 65 | 72 20 6f 66 20 76 69 64 | a numbe|r of vid|
|000002b0| 65 6f 20 64 65 76 69 63 | 65 73 2e 0a 0a 54 68 65 |eo devic|es...The|
|000002c0| 20 70 75 72 70 6f 73 65 | 20 6f 66 20 74 68 69 73 | purpose| of this|
|000002d0| 20 66 69 6c 65 20 69 73 | 20 74 6f 20 69 6e 73 74 | file is| to inst|
|000002e0| 72 75 63 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ruct app|lication|
|000002f0| 20 70 72 6f 67 72 61 6d | 6d 65 72 73 20 68 6f 77 | program|mers how|
|00000300| 20 74 6f 0a 75 73 65 20 | 74 68 65 20 56 69 64 65 | to.use |the Vide|
|00000310| 6f 20 4f 62 6a 65 63 74 | 20 6c 69 62 72 61 72 79 |o Object| library|
|00000320| 20 69 6e 20 74 68 65 69 | 72 20 6f 77 6e 20 61 70 | in thei|r own ap|
|00000330| 70 6c 69 63 61 74 69 6f | 6e 73 2c 20 61 6e 64 20 |plicatio|ns, and |
|00000340| 74 6f 20 70 72 6f 76 69 | 64 65 0a 68 65 6c 70 20 |to provi|de.help |
|00000350| 69 6e 20 61 64 64 69 6e | 67 20 6e 65 77 20 64 65 |in addin|g new de|
|00000360| 76 69 63 65 73 20 74 6f | 20 74 68 65 20 6c 69 62 |vices to| the lib|
|00000370| 72 61 72 79 2e 0a 0a 49 | 66 20 79 6f 75 20 66 69 |rary...I|f you fi|
|00000380| 6e 64 20 74 68 69 73 20 | 6f 62 6a 65 63 74 20 75 |nd this |object u|
|00000390| 73 65 66 75 6c 20 61 6e | 64 20 77 72 69 74 65 20 |seful an|d write |
|000003a0| 73 75 70 70 6f 72 74 20 | 66 6f 72 20 70 6c 61 79 |support |for play|
|000003b0| 65 72 73 20 6f 74 68 65 | 72 0a 74 68 61 6e 20 74 |ers othe|r.than t|
|000003c0| 68 6f 73 65 20 73 75 70 | 70 6f 72 74 65 64 20 68 |hose sup|ported h|
|000003d0| 65 72 65 2c 20 77 65 20 | 77 6f 75 6c 64 20 62 65 |ere, we |would be|
|000003e0| 20 67 72 61 74 65 66 75 | 6c 20 69 66 20 79 6f 75 | gratefu|l if you|
|000003f0| 20 77 6f 75 6c 64 20 73 | 65 6e 64 20 75 73 20 61 | would s|end us a|
|00000400| 0a 63 6f 70 79 20 6f 66 | 20 79 6f 75 72 20 73 6f |.copy of| your so|
|00000410| 75 72 63 65 20 63 6f 64 | 65 20 73 6f 20 74 68 61 |urce cod|e so tha|
|00000420| 74 20 77 65 20 63 61 6e | 20 61 64 64 20 79 6f 75 |t we can| add you|
|00000430| 72 20 64 72 69 76 65 72 | 20 74 6f 20 74 68 65 0a |r driver| to the.|
|00000440| 70 75 62 6c 69 63 6c 79 | 20 64 69 73 74 72 69 62 |publicly| distrib|
|00000450| 75 74 65 64 20 56 69 64 | 65 6f 4f 62 6a 65 63 74 |uted Vid|eoObject|
|00000460| 2e 0a 0a 57 65 20 68 6f | 70 65 20 74 68 61 74 20 |...We ho|pe that |
|00000470| 79 6f 75 20 66 69 6e 64 | 20 74 68 69 73 20 63 6f |you find| this co|
|00000480| 64 65 20 75 73 65 66 75 | 6c 20 69 6e 20 79 6f 75 |de usefu|l in you|
|00000490| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 2e 20 |r applic|ations. |
|000004a0| 20 49 66 20 79 6f 75 0a | 68 61 76 65 20 61 6e 79 | If you.|have any|
|000004b0| 20 63 6f 6d 6d 65 6e 74 | 73 2c 20 71 75 65 73 74 | comment|s, quest|
|000004c0| 69 6f 6e 73 2c 20 73 75 | 67 67 65 73 74 69 6f 6e |ions, su|ggestion|
|000004d0| 73 2c 20 6f 72 20 73 6f | 75 72 63 65 20 63 6f 64 |s, or so|urce cod|
|000004e0| 65 20 79 6f 75 20 77 6f | 75 6c 64 0a 6c 69 6b 65 |e you wo|uld.like|
|000004f0| 20 74 6f 20 61 64 64 2c | 20 70 6c 65 61 73 65 20 | to add,| please |
|00000500| 73 65 6e 64 20 6d 61 69 | 6c 20 74 6f 20 7b 5c 74 |send mai|l to {\t|
|00000510| 74 20 6d 61 65 73 74 72 | 6f 40 73 69 6f 75 78 2e |t maestr|o@sioux.|
|00000520| 73 74 61 6e 66 6f 72 64 | 2e 65 64 75 7d 2e 0a 0a |stanford|.edu}...|
|00000530| 0a 5c 73 65 63 74 69 6f | 6e 7b 4f 62 6a 65 63 74 |.\sectio|n{Object|
|00000540| 69 76 65 73 7d 0a 54 68 | 65 20 56 69 64 65 6f 20 |ives}.Th|e Video |
|00000550| 4c 69 62 72 61 72 79 20 | 77 61 73 20 63 72 65 61 |Library |was crea|
|00000560| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 66 6f 6c |ted with| the fol|
|00000570| 6c 6f 77 69 6e 67 20 6f | 62 6a 65 63 74 69 76 65 |lowing o|bjective|
|00000580| 73 20 3a 0a 0a 5c 62 65 | 67 69 6e 7b 65 6e 75 6d |s :..\be|gin{enum|
|00000590| 65 72 61 74 65 7d 0a 5c | 69 74 65 6d 20 54 6f 20 |erate}.\|item To |
|000005a0| 61 6c 6c 6f 77 20 70 72 | 6f 67 72 61 6d 6d 65 72 |allow pr|ogrammer|
|000005b0| 73 20 74 6f 20 77 72 69 | 74 65 20 61 70 70 6c 69 |s to wri|te appli|
|000005c0| 63 61 74 69 6f 6e 73 20 | 74 68 61 74 20 73 75 70 |cations |that sup|
|000005d0| 70 6f 72 74 20 61 20 76 | 61 72 69 65 74 79 0a 6f |port a v|ariety.o|
|000005e0| 66 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 73 20 |f video |devices |
|000005f0| 28 73 75 63 68 20 61 73 | 20 76 69 64 65 6f 64 69 |(such as| videodi|
|00000600| 73 63 20 61 6e 64 20 76 | 69 64 65 6f 74 61 70 65 |sc and v|ideotape|
|00000610| 20 70 6c 61 79 65 72 73 | 29 20 77 69 74 68 6f 75 | players|) withou|
|00000620| 74 0a 68 61 76 69 6e 67 | 20 74 6f 20 77 72 69 74 |t.having| to writ|
|00000630| 65 20 64 65 76 69 63 65 | 2d 73 70 65 63 69 66 69 |e device|-specifi|
|00000640| 63 20 63 6f 64 65 2e 20 | 54 68 65 20 61 70 70 6c |c code. |The appl|
|00000650| 69 63 61 74 69 6f 6e 20 | 70 72 6f 67 72 61 6d 20 |ication |program |
|00000660| 63 61 6c 6c 73 20 61 0a | 67 65 6e 65 72 69 63 20 |calls a.|generic |
|00000670| 7b 5c 74 74 20 44 65 76 | 3c 46 75 6e 63 74 69 6f |{\tt Dev|<Functio|
|00000680| 6e 3e 7d 20 72 65 67 61 | 72 64 6c 65 73 73 20 6f |n>} rega|rdless o|
|00000690| 66 20 77 68 61 74 20 64 | 65 76 69 63 65 20 69 73 |f what d|evice is|
|000006a0| 20 62 65 69 6e 67 20 75 | 73 65 64 2c 20 61 6e 64 | being u|sed, and|
|000006b0| 0a 74 68 65 20 76 69 64 | 65 6f 20 6c 69 62 72 61 |.the vid|eo libra|
|000006c0| 72 79 20 69 73 20 61 62 | 6c 65 20 74 6f 20 63 61 |ry is ab|le to ca|
|000006d0| 6c 6c 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 7b |ll the c|orrect {|
|000006e0| 5c 74 74 20 3c 46 75 6e | 63 74 69 6f 6e 3e 7d 20 |\tt <Fun|ction>} |
|000006f0| 66 6f 72 20 74 68 65 0a | 70 61 72 74 69 63 75 6c |for the.|particul|
|00000700| 61 72 20 64 65 76 69 63 | 65 20 63 75 72 72 65 6e |ar devic|e curren|
|00000710| 74 6c 79 20 62 65 69 6e | 67 20 75 73 65 64 2e 0a |tly bein|g used..|
|00000720| 0a 5c 69 74 65 6d 20 54 | 6f 20 61 6c 6c 6f 77 20 |.\item T|o allow |
|00000730| 70 72 6f 67 72 61 6d 6d | 65 72 73 20 74 6f 20 62 |programm|ers to b|
|00000740| 65 20 61 62 6c 65 20 74 | 6f 20 65 61 73 69 6c 79 |e able t|o easily|
|00000750| 20 61 64 64 20 6f 6e 20 | 74 6f 20 74 68 65 20 73 | add on |to the s|
|00000760| 75 69 74 65 20 6f 66 20 | 0a 64 65 76 69 63 65 20 |uite of |.device |
|00000770| 64 72 69 76 65 72 73 20 | 63 75 72 72 65 6e 74 6c |drivers |currentl|
|00000780| 79 20 61 76 61 69 6c 61 | 62 6c 65 2e 0a 5c 65 6e |y availa|ble..\en|
|00000790| 64 7b 65 6e 75 6d 65 72 | 61 74 65 7d 0a 0a 20 20 |d{enumer|ate}.. |
|000007a0| 0a 5c 73 65 63 74 69 6f | 6e 7b 44 65 66 69 6e 69 |.\sectio|n{Defini|
|000007b0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 56 69 64 65 |tion of |the Vide|
|000007c0| 6f 20 4f 62 6a 65 63 74 | 7d 0a 0a 54 68 65 20 56 |o Object|}..The V|
|000007d0| 69 64 65 6f 20 4c 69 62 | 72 61 72 79 20 63 6f 6e |ideo Lib|rary con|
|000007e0| 73 69 73 74 73 20 6f 66 | 20 64 65 76 69 63 65 2d |sists of| device-|
|000007f0| 73 70 65 63 69 66 69 63 | 20 63 6f 64 65 20 74 6f |specific| code to|
|00000800| 20 73 75 70 70 6f 72 74 | 20 61 20 6e 75 6d 62 65 | support| a numbe|
|00000810| 72 0a 6f 66 20 76 69 64 | 65 6f 20 64 65 76 69 63 |r.of vid|eo devic|
|00000820| 65 73 2e 20 20 41 20 67 | 65 6e 65 72 69 63 20 22 |es. A g|eneric "|
|00000830| 6f 62 6a 65 63 74 22 20 | 69 73 20 70 72 6f 76 69 |object" |is provi|
|00000840| 64 65 64 20 74 6f 20 74 | 68 65 20 61 70 70 6c 69 |ded to t|he appli|
|00000850| 63 61 74 69 6f 6e 0a 70 | 72 6f 67 72 61 6d 6d 65 |cation.p|rogramme|
|00000860| 72 3b 20 74 68 69 73 20 | 73 74 72 75 63 74 75 72 |r; this |structur|
|00000870| 65 20 63 6f 6e 74 61 69 | 6e 73 20 70 6f 69 6e 74 |e contai|ns point|
|00000880| 65 72 73 20 74 6f 20 66 | 75 6e 63 74 69 6f 6e 73 |ers to f|unctions|
|00000890| 20 74 68 61 74 20 72 65 | 70 72 65 73 65 6e 74 0a | that re|present.|
|000008a0| 74 68 65 20 64 65 76 69 | 63 65 20 73 70 65 63 69 |the devi|ce speci|
|000008b0| 66 69 63 20 72 6f 75 74 | 69 6e 65 73 20 66 6f 72 |fic rout|ines for|
|000008c0| 20 63 6f 6d 6d 6f 6e 20 | 61 63 74 69 6f 6e 73 20 | common |actions |
|000008d0| 73 75 63 68 20 61 73 20 | 27 70 6c 61 79 27 2c 20 |such as |'play', |
|000008e0| 27 70 61 75 73 65 27 2c | 0a 27 73 74 6f 70 27 2c |'pause',|.'stop',|
|000008f0| 20 27 73 65 61 72 63 68 | 27 2c 20 65 74 63 2e 20 | 'search|', etc. |
|00000900| 20 49 6e 20 61 64 64 69 | 74 69 6f 6e 20 74 6f 20 | In addi|tion to |
|00000910| 74 68 65 73 65 20 66 75 | 6e 63 74 69 6f 6e 20 70 |these fu|nction p|
|00000920| 6f 69 6e 74 65 72 73 2c | 20 74 68 65 0a 6f 62 6a |ointers,| the.obj|
|00000930| 65 63 74 20 63 6f 6e 74 | 61 69 6e 73 20 69 6e 66 |ect cont|ains inf|
|00000940| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 74 |ormation| about t|
|00000950| 68 65 20 63 75 72 72 65 | 6e 74 6c 79 2d 75 73 65 |he curre|ntly-use|
|00000960| 64 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 20 28 |d video |device (|
|00000970| 73 75 63 68 0a 61 73 20 | 74 68 65 20 73 65 72 69 |such.as |the seri|
|00000980| 61 6c 20 6c 69 6e 65 20 | 75 73 65 64 20 66 6f 72 |al line |used for|
|00000990| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 77 | communi|cation w|
|000009a0| 69 74 68 20 74 68 65 20 | 64 65 76 69 63 65 2c 20 |ith the |device, |
|000009b0| 74 68 65 20 73 65 72 69 | 61 6c 0a 6c 69 6e 65 20 |the seri|al.line |
|000009c0| 61 74 74 72 69 62 75 74 | 65 73 20 66 6f 72 20 74 |attribut|es for t|
|000009d0| 68 65 20 64 65 76 69 63 | 65 2c 20 69 74 73 20 70 |he devic|e, its p|
|000009e0| 65 72 66 6f 72 6d 61 6e | 63 65 20 63 68 61 72 61 |erforman|ce chara|
|000009f0| 63 74 65 72 69 73 74 69 | 63 73 2c 20 61 6e 64 20 |cteristi|cs, and |
|00000a00| 73 6f 0a 6f 6e 29 2e 20 | 54 68 69 73 20 69 6e 66 |so.on). |This inf|
|00000a10| 6f 72 6d 61 74 69 6f 6e | 20 28 64 65 76 69 63 65 |ormation| (device|
|00000a20| 20 27 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 27 | 'config|uration'|
|00000a30| 29 20 69 73 20 73 74 6f | 72 65 64 20 69 6e 20 74 |) is sto|red in t|
|00000a40| 68 65 20 64 61 74 61 0a | 73 74 72 75 63 74 75 72 |he data.|structur|
|00000a50| 65 20 63 61 6c 6c 65 64 | 20 7b 5c 74 74 20 43 6f |e called| {\tt Co|
|00000a60| 6e 66 69 67 7d 2c 20 77 | 68 69 63 68 20 69 73 20 |nfig}, w|hich is |
|00000a70| 73 74 6f 72 65 64 20 61 | 73 20 70 61 72 74 20 6f |stored a|s part o|
|00000a80| 66 20 74 68 65 20 56 69 | 64 65 6f 0a 4f 62 6a 65 |f the Vi|deo.Obje|
|00000a90| 63 74 2e 0a 0a 54 68 69 | 73 20 73 65 63 74 69 6f |ct...Thi|s sectio|
|00000aa0| 6e 20 77 69 6c 6c 20 64 | 65 73 63 72 69 62 65 20 |n will d|escribe |
|00000ab0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|00000ac0| 6d 70 6f 6e 65 6e 74 73 | 20 6f 66 20 74 68 65 20 |mponents| of the |
|00000ad0| 56 69 64 65 6f 20 4f 62 | 6a 65 63 74 0a 69 6e 20 |Video Ob|ject.in |
|00000ae0| 64 65 74 61 69 6c 3a 0a | 0a 5c 62 65 67 69 6e 7b |detail:.|.\begin{|
|00000af0| 69 74 65 6d 69 7a 65 7d | 0a 5c 69 74 65 6d 7b 43 |itemize}|.\item{C|
|00000b00| 6f 6e 66 69 67 20 2d 2d | 2d 7d 20 44 61 74 61 20 |onfig --|-} Data |
|00000b10| 73 74 72 75 63 74 75 72 | 65 20 63 6f 6e 74 61 69 |structur|e contai|
|00000b20| 6e 69 6e 67 20 64 65 76 | 69 63 65 2d 73 70 65 63 |ning dev|ice-spec|
|00000b30| 69 66 69 63 20 73 65 72 | 69 61 6c 20 6c 69 6e 65 |ific ser|ial line|
|00000b40| 20 61 6e 64 0a 70 65 72 | 66 6f 72 6d 61 6e 63 65 | and.per|formance|
|00000b50| 20 61 74 74 72 69 62 75 | 74 65 73 0a 0a 5c 69 74 | attribu|tes..\it|
|00000b60| 65 6d 7b 56 69 64 65 6f | 20 46 75 6e 63 74 69 6f |em{Video| Functio|
|00000b70| 6e 73 20 2d 2d 2d 7d 20 | 54 68 65 20 76 61 72 69 |ns ---} |The vari|
|00000b80| 6f 75 73 20 66 75 6e 63 | 74 69 6f 6e 73 20 73 75 |ous func|tions su|
|00000b90| 70 70 6f 72 74 65 64 20 | 62 79 20 74 68 65 20 56 |pported |by the V|
|00000ba0| 69 64 65 6f 0a 4f 62 6a | 65 63 74 20 61 6e 64 20 |ideo.Obj|ect and |
|00000bb0| 74 68 65 69 72 20 73 65 | 6d 61 6e 74 69 63 73 2e |their se|mantics.|
|00000bc0| 0a 0a 5c 65 6e 64 7b 69 | 74 65 6d 69 7a 65 7d 0a |..\end{i|temize}.|
|00000bd0| 0a 54 68 69 73 20 73 65 | 63 74 69 6f 6e 20 65 6e |.This se|ction en|
|00000be0| 64 73 20 77 69 74 68 20 | 61 20 6e 6f 74 65 20 6f |ds with |a note o|
|00000bf0| 6e 20 73 74 61 74 75 73 | 20 63 6f 64 65 73 2c 20 |n status| codes, |
|00000c00| 6f 75 74 6c 69 6e 69 6e | 67 20 74 68 65 20 64 69 |outlinin|g the di|
|00000c10| 66 66 65 72 65 6e 63 65 | 73 0a 62 65 74 77 65 65 |fference|s.betwee|
|00000c20| 6e 20 74 68 65 20 73 74 | 61 74 75 73 20 63 6f 64 |n the st|atus cod|
|00000c30| 65 73 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 74 |es retur|ned by t|
|00000c40| 68 65 20 64 65 76 69 63 | 65 73 2c 20 61 6e 64 20 |he devic|es, and |
|00000c50| 74 68 65 20 73 74 61 74 | 75 73 20 63 6f 64 65 73 |the stat|us codes|
|00000c60| 0a 74 68 61 74 20 61 72 | 65 20 72 65 74 75 72 6e |.that ar|e return|
|00000c70| 65 64 20 66 72 6f 6d 20 | 74 68 65 20 56 69 64 65 |ed from |the Vide|
|00000c80| 6f 20 4f 62 6a 65 63 74 | 20 74 6f 20 74 68 65 20 |o Object| to the |
|00000c90| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 0a 0a 0a 5c |applicat|ion....\|
|00000ca0| 73 75 62 73 65 63 74 69 | 6f 6e 7b 54 68 65 20 7b |subsecti|on{The {|
|00000cb0| 5c 74 74 20 43 6f 6e 66 | 69 67 7d 20 53 74 72 75 |\tt Conf|ig} Stru|
|00000cc0| 63 74 75 72 65 20 2d 2d | 2d 20 56 69 64 65 6f 20 |cture --|- Video |
|00000cd0| 44 65 76 69 63 65 20 43 | 6f 6e 66 69 67 75 72 61 |Device C|onfigura|
|00000ce0| 74 69 6f 6e 7d 0a 0a 54 | 68 65 20 7b 5c 74 74 20 |tion}..T|he {\tt |
|00000cf0| 43 6f 6e 66 69 67 7d 20 | 64 61 74 61 20 73 74 72 |Config} |data str|
|00000d00| 75 63 74 75 72 65 20 73 | 74 6f 72 65 73 20 74 68 |ucture s|tores th|
|00000d10| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|00000d20| 6f 66 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 0a |of a par|ticular.|
|00000d30| 76 69 64 65 6f 20 64 65 | 76 69 63 65 2c 20 61 6e |video de|vice, an|
|00000d40| 64 20 69 73 20 64 65 66 | 69 6e 65 64 20 61 73 20 |d is def|ined as |
|00000d50| 66 6f 6c 6c 6f 77 73 3a | 0a 0a 5c 62 65 67 69 6e |follows:|..\begin|
|00000d60| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 20 20 20 20 20 |{verbati|m}. |
|00000d70| 20 20 20 74 79 70 65 64 | 65 66 20 73 74 72 75 63 | typed|ef struc|
|00000d80| 74 20 5f 43 6f 6e 66 69 | 67 20 0a 20 20 20 20 20 |t _Confi|g . |
|00000d90| 20 20 20 7b 20 20 20 20 | 20 20 20 0a 20 20 20 20 | { | . |
|00000da0| 20 20 20 20 20 20 63 68 | 61 72 20 6d 6f 64 65 6c | ch|ar model|
|00000db0| 4e 61 6d 65 5b 4d 61 78 | 4e 61 6d 65 4c 65 6e 67 |Name[Max|NameLeng|
|00000dc0| 74 68 5d 3b 0a 20 20 20 | 20 20 20 20 20 20 20 63 |th];. | c|
|00000dd0| 68 61 72 20 73 65 72 69 | 61 6c 50 6f 72 74 5b 31 |har seri|alPort[1|
|00000de0| 35 5d 3b 0a 20 20 20 20 | 20 20 20 20 20 20 69 6e |5];. | in|
|00000df0| 74 20 62 61 75 64 52 61 | 74 65 3b 0a 20 20 20 20 |t baudRa|te;. |
|00000e00| 20 20 20 20 20 20 69 6e | 74 20 65 6f 6c 43 68 61 | in|t eolCha|
|00000e10| 72 3b 0a 20 20 20 20 20 | 20 20 20 20 20 69 6e 74 |r;. | int|
|00000e20| 20 63 68 61 72 53 69 7a | 65 3b 0a 20 20 20 20 20 | charSiz|e;. |
|00000e30| 20 20 20 20 20 65 6e 75 | 6d 20 50 61 72 69 74 79 | enu|m Parity|
|00000e40| 20 70 61 72 69 74 79 3b | 0a 20 20 20 20 20 20 20 | parity;|. |
|00000e50| 20 20 20 65 6e 75 6d 20 | 42 6f 6f 6c 65 61 6e 20 | enum |Boolean |
|00000e60| 69 67 50 61 72 45 72 72 | 6f 72 3b 0a 20 20 20 20 |igParErr|or;. |
|00000e70| 20 20 20 20 20 20 65 6e | 75 6d 20 42 6f 6f 6c 65 | en|um Boole|
|00000e80| 61 6e 20 66 6c 6f 77 43 | 6f 6e 74 72 6f 6c 3b 0a |an flowC|ontrol;.|
|00000e90| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 6d 61 | | int ma|
|00000ea0| 78 53 70 65 65 64 3b 0a | 20 20 20 20 20 20 20 20 |xSpeed;.| |
|00000eb0| 20 20 69 6e 74 20 66 64 | 3b 0a 20 20 20 20 20 20 | int fd|;. |
|00000ec0| 20 20 7d 20 43 6f 6e 66 | 69 67 3b 0a 5c 65 6e 64 | } Conf|ig;.\end|
|00000ed0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 0a 54 68 65 20 |{verbati|m}..The |
|00000ee0| 7b 5c 74 74 20 6d 6f 64 | 65 6c 4e 61 6d 65 7d 20 |{\tt mod|elName} |
|00000ef0| 66 69 65 6c 64 20 69 73 | 20 61 20 53 74 72 69 6e |field is| a Strin|
|00000f00| 67 20 74 68 61 74 20 64 | 65 6e 6f 74 65 73 20 74 |g that d|enotes t|
|00000f10| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 0a 64 |he name |of the.d|
|00000f20| 65 76 69 63 65 2e 20 20 | 54 68 69 73 20 77 69 6c |evice. |This wil|
|00000f30| 6c 20 62 65 20 74 68 65 | 20 6e 61 6d 65 20 75 73 |l be the| name us|
|00000f40| 65 64 20 62 79 20 74 68 | 65 20 61 70 70 6c 69 63 |ed by th|e applic|
|00000f50| 61 74 69 6f 6e 20 61 6e | 64 20 74 68 65 20 6c 69 |ation an|d the li|
|00000f60| 62 72 61 72 79 2e 0a 0a | 54 68 65 20 7b 5c 74 74 |brary...|The {\tt|
|00000f70| 20 73 65 72 69 61 6c 50 | 6f 72 74 7d 20 66 69 65 | serialP|ort} fie|
|00000f80| 6c 64 20 69 73 20 61 20 | 53 74 72 69 6e 67 20 74 |ld is a |String t|
|00000f90| 68 61 74 20 64 65 6e 6f | 74 65 73 20 74 68 65 20 |hat deno|tes the |
|00000fa0| 73 65 72 69 61 6c 20 70 | 6f 72 74 20 74 6f 0a 77 |serial p|ort to.w|
|00000fb0| 68 69 63 68 20 74 68 65 | 20 64 65 76 69 63 65 20 |hich the| device |
|00000fc0| 69 73 20 70 68 79 73 69 | 63 61 6c 6c 79 20 61 74 |is physi|cally at|
|00000fd0| 74 61 63 68 65 64 2e 20 | 20 54 68 69 73 20 66 69 |tached. | This fi|
|00000fe0| 65 6c 64 20 69 73 20 6c | 69 6b 65 6c 79 20 74 6f |eld is l|ikely to|
|00000ff0| 20 62 65 0a 64 69 66 66 | 65 72 65 6e 74 20 66 6f | be.diff|erent fo|
|00001000| 72 20 64 69 66 66 65 72 | 65 6e 74 20 6d 61 63 68 |r differ|ent mach|
|00001010| 69 6e 65 73 20 28 61 6e | 64 20 75 73 65 72 73 29 |ines (an|d users)|
|00001020| 2e 20 20 54 6f 20 6c 65 | 74 20 61 70 70 6c 69 63 |. To le|t applic|
|00001030| 61 74 69 6f 6e 73 20 74 | 6f 0a 75 73 65 20 61 20 |ations t|o.use a |
|00001040| 64 69 66 66 65 72 65 6e | 74 20 76 61 6c 75 65 20 |differen|t value |
|00001050| 66 6f 72 20 74 68 69 73 | 20 66 69 65 6c 64 20 65 |for this| field e|
|00001060| 61 73 69 6c 79 20 77 69 | 74 68 6f 75 74 20 68 61 |asily wi|thout ha|
|00001070| 76 69 6e 67 20 74 6f 20 | 63 68 61 6e 67 65 0a 61 |ving to |change.a|
|00001080| 6e 64 20 72 65 63 6f 6d | 70 69 6c 65 20 74 68 65 |nd recom|pile the|
|00001090| 69 72 20 63 6f 64 65 2c | 20 74 68 65 20 56 69 64 |ir code,| the Vid|
|000010a0| 65 6f 20 4f 62 6a 65 63 | 74 20 63 61 6c 6c 73 20 |eo Objec|t calls |
|000010b0| 7b 5c 74 74 20 58 47 65 | 74 44 65 66 61 75 6c 74 |{\tt XGe|tDefault|
|000010c0| 28 29 7d 0a 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |()}.to d|etermine|
|000010d0| 20 74 68 65 20 75 73 65 | 72 27 73 20 64 65 66 61 | the use|r's defa|
|000010e0| 75 6c 74 20 73 65 72 69 | 61 6c 20 70 6f 72 74 20 |ult seri|al port |
|000010f0| 74 6f 20 75 73 65 20 66 | 6f 72 20 74 68 65 20 64 |to use f|or the d|
|00001100| 65 76 69 63 65 2e 0a 0a | 7b 5c 74 74 20 58 47 65 |evice...|{\tt XGe|
|00001110| 74 44 65 66 61 75 6c 74 | 28 29 7d 20 69 73 20 63 |tDefault|()} is c|
|00001120| 61 6c 6c 65 64 20 77 69 | 74 68 20 74 68 65 20 7b |alled wi|th the {|
|00001130| 5c 74 74 20 6d 6f 64 65 | 6c 4e 61 6d 65 7d 20 66 |\tt mode|lName} f|
|00001140| 69 65 6c 64 20 61 73 20 | 69 74 73 0a 73 65 63 6f |ield as |its.seco|
|00001150| 6e 64 20 61 72 67 75 6d | 65 6e 74 2c 20 61 6e 64 |nd argum|ent, and|
|00001160| 20 7b 5c 74 74 20 73 65 | 72 69 61 6c 50 6f 72 74 | {\tt se|rialPort|
|00001170| 7d 20 61 73 20 69 74 73 | 20 74 68 69 72 64 20 61 |} as its| third a|
|00001180| 72 67 75 6d 65 6e 74 2e | 20 20 54 68 65 72 65 66 |rgument.| Theref|
|00001190| 6f 72 65 0a 74 68 65 20 | 66 6f 72 6d 20 66 6f 72 |ore.the |form for|
|000011a0| 20 73 74 6f 72 69 6e 67 | 20 73 65 72 69 61 6c 20 | storing| serial |
|000011b0| 70 6f 72 74 20 64 65 66 | 61 75 6c 74 73 20 61 73 |port def|aults as|
|000011c0| 20 61 6e 20 58 20 72 65 | 73 6f 75 72 63 65 20 69 | an X re|source i|
|000011d0| 73 20 61 73 0a 66 6f 6c | 6c 6f 77 73 3a 0a 0a 5c |s as.fol|lows:..\|
|000011e0| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0a |begin{ve|rbatim}.|
|000011f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001200| 3c 6d 6f 64 65 6c 4e 61 | 6d 65 3e 2e 73 65 72 69 |<modelNa|me>.seri|
|00001210| 61 6c 50 6f 72 74 3a 20 | 20 20 20 20 20 20 20 20 |alPort: | |
|00001220| 3c 73 65 72 69 61 6c 20 | 70 6f 72 74 3e 0a 5c 65 |<serial |port>.\e|
|00001230| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0a 0a 54 68 |nd{verba|tim}..Th|
|00001240| 65 20 7b 5c 74 74 20 62 | 61 75 64 52 61 74 65 7d |e {\tt b|audRate}|
|00001250| 20 66 69 65 6c 64 20 69 | 73 20 61 6e 20 49 6e 74 | field i|s an Int|
|00001260| 65 67 65 72 20 74 68 61 | 74 20 64 65 6e 6f 74 65 |eger tha|t denote|
|00001270| 73 20 74 68 65 20 62 61 | 75 64 20 72 61 74 65 20 |s the ba|ud rate |
|00001280| 61 74 20 77 68 69 63 68 | 0a 64 61 74 61 20 74 72 |at which|.data tr|
|00001290| 61 6e 73 66 65 72 20 69 | 73 20 63 61 72 72 69 65 |ansfer i|s carrie|
|000012a0| 64 20 6f 75 74 2e 0a 0a | 54 68 65 20 7b 5c 74 74 |d out...|The {\tt|
|000012b0| 20 65 6f 6c 43 68 61 72 | 7d 20 66 69 65 6c 64 20 | eolChar|} field |
|000012c0| 69 73 20 61 6e 20 49 6e | 74 65 67 65 72 20 74 68 |is an In|teger th|
|000012d0| 61 74 20 72 65 70 72 65 | 73 65 6e 74 73 20 74 68 |at repre|sents th|
|000012e0| 65 20 41 53 43 49 49 20 | 76 61 6c 75 65 0a 28 64 |e ASCII |value.(d|
|000012f0| 65 63 69 6d 61 6c 29 20 | 6f 66 20 74 68 65 20 63 |ecimal) |of the c|
|00001300| 68 61 72 61 63 74 65 72 | 20 73 65 6e 74 20 62 79 |haracter| sent by|
|00001310| 20 74 68 65 20 64 65 76 | 69 63 65 20 64 65 6e 6f | the dev|ice deno|
|00001320| 74 69 6e 67 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |ting the| end of |
|00001330| 61 20 6c 69 6e 65 0a 61 | 6e 64 20 74 68 61 74 20 |a line.a|nd that |
|00001340| 61 20 72 65 61 64 28 29 | 20 73 68 6f 75 6c 64 20 |a read()| should |
|00001350| 62 65 20 70 65 72 66 6f | 72 6d 65 64 2e 0a 0a 54 |be perfo|rmed...T|
|00001360| 68 65 72 65 20 61 72 65 | 20 74 77 6f 20 72 65 61 |here are| two rea|
|00001370| 73 6f 6e 73 20 77 68 79 | 20 74 68 65 20 7b 5c 74 |sons why| the {\t|
|00001380| 74 20 65 6f 6c 43 68 61 | 72 7d 20 66 69 65 6c 64 |t eolCha|r} field|
|00001390| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 2e 0a 46 | is nece|ssary..F|
|000013a0| 69 72 73 74 6c 79 2c 20 | 74 68 69 73 20 66 69 65 |irstly, |this fie|
|000013b0| 6c 64 20 64 69 73 74 69 | 6e 67 75 69 73 68 65 73 |ld disti|nguishes|
|000013c0| 20 77 68 65 74 68 65 72 | 20 74 68 65 20 56 69 64 | whether| the Vid|
|000013d0| 65 6f 20 4f 62 6a 65 63 | 74 20 73 68 6f 75 6c 64 |eo Objec|t should|
|000013e0| 20 75 73 65 0a 63 61 6e | 6f 6e 69 63 61 6c 20 69 | use.can|onical i|
|000013f0| 6e 70 75 74 20 70 72 6f | 63 65 73 73 69 6e 67 20 |nput pro|cessing |
|00001400| 28 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 7b 5c |(the val|ue of {\|
|00001410| 74 74 20 65 6f 6c 43 68 | 61 72 7d 20 69 73 20 6e |tt eolCh|ar} is n|
|00001420| 6f 6e 2d 20 6e 65 67 61 | 74 69 76 65 29 0a 6f 72 |on- nega|tive).or|
|00001430| 20 6e 6f 6e 2d 63 61 6e | 6f 6e 69 63 61 6c 20 69 | non-can|onical i|
|00001440| 6e 70 75 74 20 70 72 6f | 63 65 73 73 69 6e 67 20 |nput pro|cessing |
|00001450| 28 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 7b 5c |(the val|ue of {\|
|00001460| 74 74 20 65 6f 6c 43 68 | 61 72 7d 20 69 73 0a 6e |tt eolCh|ar} is.n|
|00001470| 65 67 61 74 69 76 65 29 | 20 74 6f 20 63 6f 6d 6d |egative)| to comm|
|00001480| 75 6e 69 63 61 74 65 20 | 77 69 74 68 20 74 68 65 |unicate |with the|
|00001490| 20 64 65 76 69 63 65 2e | 20 20 43 61 6e 6f 6e 69 | device.| Canoni|
|000014a0| 63 61 6c 20 69 6e 70 75 | 74 20 70 72 6f 63 65 73 |cal inpu|t proces|
|000014b0| 73 69 6e 67 20 69 73 0a | 75 73 65 64 20 66 6f 72 |sing is.|used for|
|000014c0| 20 64 65 76 69 63 65 73 | 20 74 68 61 74 20 72 65 | devices| that re|
|000014d0| 74 75 72 6e 20 61 20 73 | 70 65 63 69 61 6c 20 63 |turn a s|pecial c|
|000014e0| 68 61 72 61 63 74 65 72 | 20 74 6f 20 64 65 6e 6f |haracter| to deno|
|000014f0| 74 65 20 74 68 65 20 65 | 6e 64 20 6f 66 20 61 0a |te the e|nd of a.|
|00001500| 6c 69 6e 65 2c 20 77 68 | 69 6c 65 20 6e 6f 6e 2d |line, wh|ile non-|
|00001510| 63 61 6e 6f 6e 69 63 61 | 6c 20 69 6e 70 75 74 20 |canonica|l input |
|00001520| 70 72 6f 63 65 73 73 69 | 6e 67 20 69 73 20 75 73 |processi|ng is us|
|00001530| 65 64 20 66 6f 72 20 74 | 68 6f 73 65 20 64 65 76 |ed for t|hose dev|
|00001540| 69 63 65 73 0a 74 68 61 | 74 20 64 6f 20 6e 6f 74 |ices.tha|t do not|
|00001550| 20 72 65 74 75 72 6e 20 | 61 20 73 70 65 63 69 61 | return |a specia|
|00001560| 6c 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 63 68 |l end-of|-line ch|
|00001570| 61 72 61 63 74 65 72 2e | 20 5b 46 6f 72 20 6d 6f |aracter.| [For mo|
|00001580| 72 65 0a 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2c 20 |re.infor|mation, |
|00001590| 70 6c 65 61 73 65 20 72 | 65 61 64 20 74 68 65 20 |please r|ead the |
|000015a0| 6d 61 6e 20 70 61 67 65 | 73 20 6f 6e 20 74 65 72 |man page|s on ter|
|000015b0| 6d 69 6f 28 34 29 2e 20 | 20 46 6f 72 20 61 6e 20 |mio(4). | For an |
|000015c0| 65 78 61 6d 70 6c 65 20 | 6f 66 0a 61 20 64 65 76 |example |of.a dev|
|000015d0| 69 63 65 20 74 68 61 74 | 20 64 6f 65 73 20 63 61 |ice that| does ca|
|000015e0| 6e 6f 6e 69 63 61 6c 20 | 69 6e 70 75 74 20 70 72 |nonical |input pr|
|000015f0| 6f 63 65 73 73 69 6e 67 | 2c 20 70 6c 65 61 73 65 |ocessing|, please|
|00001600| 20 6c 6f 6f 6b 20 61 74 | 20 74 68 65 20 73 6f 75 | look at| the sou|
|00001610| 72 63 65 0a 63 6f 64 65 | 20 66 6f 72 20 74 68 65 |rce.code| for the|
|00001620| 20 50 69 6f 6e 65 65 72 | 34 32 30 30 20 56 69 64 | Pioneer|4200 Vid|
|00001630| 65 6f 20 4f 62 6a 65 63 | 74 20 28 50 69 6f 6e 65 |eo Objec|t (Pione|
|00001640| 65 72 34 32 30 30 44 72 | 69 76 65 72 2e 63 29 2e |er4200Dr|iver.c).|
|00001650| 20 20 46 6f 72 20 61 6e | 0a 65 78 61 6d 70 6c 65 | For an|.example|
|00001660| 20 6f 66 20 61 20 64 65 | 76 69 63 65 20 74 68 61 | of a de|vice tha|
|00001670| 74 20 75 73 65 73 20 6e | 6f 6e 2d 63 61 6e 6f 6e |t uses n|on-canon|
|00001680| 69 63 61 6c 20 69 6e 70 | 75 74 20 70 72 6f 63 65 |ical inp|ut proce|
|00001690| 73 73 69 6e 67 2c 20 70 | 6c 65 61 73 65 0a 6c 6f |ssing, p|lease.lo|
|000016a0| 6f 6b 20 61 74 20 74 68 | 65 20 73 6f 75 72 63 65 |ok at th|e source|
|000016b0| 20 63 6f 64 65 20 66 6f | 72 20 74 68 65 20 53 6f | code fo|r the So|
|000016c0| 6e 79 31 35 35 30 20 56 | 69 64 65 6f 20 4f 62 6a |ny1550 V|ideo Obj|
|000016d0| 65 63 74 0a 28 53 6f 6e | 79 31 35 35 30 44 72 69 |ect.(Son|y1550Dri|
|000016e0| 76 65 72 2e 63 29 2e 5d | 0a 0a 53 65 63 6f 6e 64 |ver.c).]|..Second|
|000016f0| 6c 79 2c 20 77 69 74 68 | 20 63 61 6e 6f 6e 69 63 |ly, with| canonic|
|00001700| 61 6c 20 69 6e 70 75 74 | 20 70 72 6f 63 65 73 73 |al input| process|
|00001710| 69 6e 67 2c 20 55 6e 69 | 78 20 72 65 63 6f 67 6e |ing, Uni|x recogn|
|00001720| 69 7a 65 73 20 61 20 6c | 69 6e 65 20 62 79 20 74 |izes a l|ine by t|
|00001730| 68 65 0a 7b 5c 74 74 20 | 4e 45 57 4c 49 4e 45 20 |he.{\tt |NEWLINE |
|00001740| 28 41 53 43 49 49 20 4c | 46 29 7d 20 63 68 61 72 |(ASCII L|F)} char|
|00001750| 61 63 74 65 72 20 6f 72 | 20 74 68 65 20 7b 5c 74 |acter or| the {\t|
|00001760| 74 20 45 4f 46 20 28 41 | 53 43 49 49 20 45 4f 54 |t EOF (A|SCII EOT|
|00001770| 29 7d 0a 63 68 61 72 61 | 63 74 65 72 2c 20 6f 72 |)}.chara|cter, or|
|00001780| 20 74 77 6f 20 6f 74 68 | 65 72 20 75 73 65 72 2d | two oth|er user-|
|00001790| 73 70 65 63 69 66 69 65 | 64 20 63 68 61 72 61 63 |specifie|d charac|
|000017a0| 74 65 72 73 2e 20 20 42 | 65 63 61 75 73 65 20 64 |ters. B|ecause d|
|000017b0| 69 66 66 65 72 65 6e 74 | 0a 64 65 76 69 63 65 73 |ifferent|.devices|
|000017c0| 20 68 61 76 65 20 64 69 | 66 66 65 72 65 6e 74 20 | have di|fferent |
|000017d0| 65 6e 64 2d 6f 66 2d 6c | 69 6e 65 20 63 68 61 72 |end-of-l|ine char|
|000017e0| 61 63 74 65 72 73 2c 20 | 74 68 65 20 56 69 64 65 |acters, |the Vide|
|000017f0| 6f 20 4f 62 6a 65 63 74 | 20 72 65 71 75 69 72 65 |o Object| require|
|00001800| 73 0a 74 68 61 74 20 74 | 68 65 20 64 65 76 69 63 |s.that t|he devic|
|00001810| 65 20 73 70 65 63 69 66 | 69 65 73 20 65 78 70 6c |e specif|ies expl|
|00001820| 69 63 69 74 6c 79 20 69 | 74 73 20 65 6e 64 2d 6f |icitly i|ts end-o|
|00001830| 66 2d 6c 69 6e 65 20 63 | 68 61 72 61 63 74 65 72 |f-line c|haracter|
|00001840| 20 69 6e 20 74 68 69 73 | 0a 7b 5c 74 74 20 65 6f | in this|.{\tt eo|
|00001850| 6c 43 68 61 72 7d 20 66 | 69 65 6c 64 2e 0a 0a 54 |lChar} f|ield...T|
|00001860| 68 65 20 7b 5c 74 74 20 | 63 68 61 72 53 69 7a 65 |he {\tt |charSize|
|00001870| 7d 20 66 69 65 6c 64 20 | 69 73 20 61 6e 20 49 6e |} field |is an In|
|00001880| 74 65 67 65 72 20 74 68 | 61 74 20 64 65 6e 6f 74 |teger th|at denot|
|00001890| 65 73 20 74 68 65 20 73 | 69 7a 65 20 69 6e 20 62 |es the s|ize in b|
|000018a0| 69 74 73 20 6f 66 0a 61 | 20 64 61 74 61 20 63 68 |its of.a| data ch|
|000018b0| 61 72 61 63 74 65 72 2e | 20 56 61 6c 69 64 20 76 |aracter.| Valid v|
|000018c0| 61 6c 75 65 73 20 63 61 | 6e 20 62 65 20 35 2c 20 |alues ca|n be 5, |
|000018d0| 36 2c 20 37 20 6f 72 20 | 38 2e 0a 0a 54 68 65 20 |6, 7 or |8...The |
|000018e0| 7b 5c 74 74 20 70 61 72 | 69 74 79 7d 20 66 69 65 |{\tt par|ity} fie|
|000018f0| 6c 64 20 69 73 20 61 6e | 20 45 6e 75 6d 20 50 61 |ld is an| Enum Pa|
|00001900| 72 69 74 79 20 74 68 61 | 74 20 63 61 6e 20 62 65 |rity tha|t can be|
|00001910| 20 65 69 74 68 65 72 20 | 7b 5c 74 74 20 4f 64 64 | either |{\tt Odd|
|00001920| 7d 2c 0a 7b 5c 74 74 20 | 45 76 65 6e 7d 2c 20 7b |},.{\tt |Even}, {|
|00001930| 5c 74 74 20 4e 6f 50 61 | 72 69 74 79 7d 20 6f 72 |\tt NoPa|rity} or|
|00001940| 20 7b 5c 74 74 20 41 6e | 79 7d 2e 0a 0a 54 68 65 | {\tt An|y}...The|
|00001950| 20 7b 5c 74 74 20 69 67 | 50 61 72 45 72 72 6f 72 | {\tt ig|ParError|
|00001960| 7d 20 66 69 65 6c 64 20 | 69 73 20 61 6e 20 45 6e |} field |is an En|
|00001970| 75 6d 20 42 6f 6f 6c 65 | 61 6e 20 74 68 61 74 20 |um Boole|an that |
|00001980| 69 73 20 7b 5c 74 74 20 | 59 65 73 7d 20 69 66 20 |is {\tt |Yes} if |
|00001990| 74 68 65 0a 56 69 64 65 | 6f 20 4f 62 6a 65 63 74 |the.Vide|o Object|
|000019a0| 20 77 61 6e 74 73 20 74 | 6f 20 69 67 6e 6f 72 65 | wants t|o ignore|
|000019b0| 20 70 61 72 69 74 79 20 | 65 72 72 6f 72 73 2c 20 | parity |errors, |
|000019c0| 61 6e 64 20 7b 5c 74 74 | 20 4e 6f 7d 20 69 66 20 |and {\tt| No} if |
|000019d0| 74 68 65 20 56 69 64 65 | 6f 0a 4f 62 6a 65 63 74 |the Vide|o.Object|
|000019e0| 20 64 6f 65 73 20 6e 6f | 74 20 77 61 6e 74 20 74 | does no|t want t|
|000019f0| 6f 20 69 67 6e 6f 72 65 | 20 70 61 72 69 74 79 20 |o ignore| parity |
|00001a00| 65 72 72 6f 72 73 2e 0a | 0a 54 68 65 20 7b 5c 74 |errors..|.The {\t|
|00001a10| 74 20 66 6c 6f 77 43 6f | 6e 74 72 6f 6c 7d 20 66 |t flowCo|ntrol} f|
|00001a20| 69 65 6c 64 20 69 73 20 | 61 6e 20 45 6e 75 6d 20 |ield is |an Enum |
|00001a30| 42 6f 6f 6c 65 61 6e 20 | 74 68 61 74 20 69 73 20 |Boolean |that is |
|00001a40| 7b 5c 74 74 20 59 65 73 | 7d 20 69 66 0a 74 68 65 |{\tt Yes|} if.the|
|00001a50| 20 66 6c 6f 77 20 63 6f | 6e 74 72 6f 6c 20 69 73 | flow co|ntrol is|
|00001a60| 20 64 65 73 69 72 65 64 | 20 66 6f 72 20 74 68 65 | desired| for the|
|00001a70| 20 64 65 76 69 63 65 20 | 77 69 74 68 20 77 68 69 | device |with whi|
|00001a80| 63 68 20 74 68 65 20 56 | 69 64 65 6f 20 4f 62 6a |ch the V|ideo Obj|
|00001a90| 65 63 74 0a 69 73 20 63 | 6f 6d 6d 75 6e 69 63 61 |ect.is c|ommunica|
|00001aa0| 74 69 6e 67 2c 20 61 6e | 64 20 7b 5c 74 74 20 4e |ting, an|d {\tt N|
|00001ab0| 6f 7d 20 69 66 20 74 68 | 65 20 64 65 76 69 63 65 |o} if th|e device|
|00001ac0| 20 64 6f 65 73 20 6e 6f | 74 20 75 73 65 20 66 6c | does no|t use fl|
|00001ad0| 6f 77 0a 63 6f 6e 74 72 | 6f 6c 2e 0a 0a 54 68 65 |ow.contr|ol...The|
|00001ae0| 20 7b 5c 74 74 20 6d 61 | 78 53 70 65 65 64 7d 20 | {\tt ma|xSpeed} |
|00001af0| 66 69 65 6c 64 20 69 73 | 20 61 6e 20 49 6e 74 65 |field is| an Inte|
|00001b00| 67 65 72 20 74 68 61 74 | 20 64 65 6e 6f 74 65 73 |ger that| denotes|
|00001b10| 20 74 68 65 20 6d 61 78 | 69 6d 75 6d 20 73 70 65 | the max|imum spe|
|00001b20| 65 64 20 69 6e 0a 74 65 | 72 6d 73 20 6f 66 20 66 |ed in.te|rms of f|
|00001b30| 72 61 6d 65 73 2f 73 65 | 63 6f 6e 64 20 74 68 61 |rames/se|cond tha|
|00001b40| 74 20 74 68 65 20 64 65 | 76 69 63 65 20 69 73 20 |t the de|vice is |
|00001b50| 63 61 70 61 62 6c 65 20 | 6f 66 20 70 6c 61 79 69 |capable |of playi|
|00001b60| 6e 67 2e 0a 0a 54 68 65 | 20 7b 5c 74 74 20 66 69 |ng...The| {\tt fi|
|00001b70| 6c 65 44 65 73 63 72 69 | 70 74 6f 72 7d 20 66 69 |leDescri|ptor} fi|
|00001b80| 65 6c 64 20 69 73 20 61 | 6e 20 49 6e 74 65 67 65 |eld is a|n Intege|
|00001b90| 72 20 74 68 61 74 20 64 | 65 6e 6f 74 65 73 20 74 |r that d|enotes t|
|00001ba0| 68 65 20 66 69 6c 65 0a | 64 65 73 63 72 69 70 74 |he file.|descript|
|00001bb0| 6f 72 20 66 6f 72 20 74 | 68 65 20 64 65 76 69 63 |or for t|he devic|
|00001bc0| 65 2c 20 61 66 74 65 72 | 20 74 68 65 20 73 65 72 |e, after| the ser|
|00001bd0| 69 61 6c 20 70 6f 72 74 | 20 63 6f 6e 6e 65 63 74 |ial port| connect|
|00001be0| 69 6f 6e 20 68 61 73 20 | 62 65 65 6e 0a 6d 61 64 |ion has |been.mad|
|00001bf0| 65 2e 20 20 49 74 73 20 | 69 6e 69 74 69 61 6c 20 |e. Its |initial |
|00001c00| 76 61 6c 75 65 20 63 61 | 6e 20 62 65 20 73 65 74 |value ca|n be set|
|00001c10| 20 74 6f 20 61 6e 79 20 | 6e 65 67 61 74 69 76 65 | to any |negative|
|00001c20| 20 6e 75 6d 62 65 72 2e | 0a 0a 0a 5c 73 75 62 73 | number.|...\subs|
|00001c30| 65 63 74 69 6f 6e 7b 4e | 6f 74 65 73 20 6f 6e 20 |ection{N|otes on |
|00001c40| 43 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 53 65 |Configur|ation Se|
|00001c50| 74 74 69 6e 67 73 7d 0a | 0a 5c 62 65 67 69 6e 7b |ttings}.|.\begin{|
|00001c60| 65 6e 75 6d 65 72 61 74 | 65 7d 0a 5c 69 74 65 6d |enumerat|e}.\item|
|00001c70| 20 49 66 20 74 68 65 20 | 64 65 76 69 63 65 20 64 | If the |device d|
|00001c80| 6f 65 73 20 6e 6f 74 20 | 72 65 74 75 72 6e 20 61 |oes not |return a|
|00001c90| 6e 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 63 68 |n end-of|-line ch|
|00001ca0| 61 72 61 63 74 65 72 2c | 20 65 6e 74 65 72 20 61 |aracter,| enter a|
|00001cb0| 0a 6e 65 67 61 74 69 76 | 65 20 6e 75 6d 62 65 72 |.negativ|e number|
|00001cc0| 20 69 6e 20 74 68 65 20 | 7b 5c 74 74 20 65 6f 6c | in the |{\tt eol|
|00001cd0| 43 68 61 72 7d 20 66 69 | 65 6c 64 2e 20 20 49 74 |Char} fi|eld. It|
|00001ce0| 20 69 73 20 61 73 73 75 | 6d 65 64 20 74 68 61 74 | is assu|med that|
|00001cf0| 0a 6e 6f 6e 2d 63 61 6e | 6f 6e 69 63 61 6c 20 69 |.non-can|onical i|
|00001d00| 6e 70 75 74 20 70 72 6f | 63 65 73 73 69 6e 67 20 |nput pro|cessing |
|00001d10| 77 69 6c 6c 20 62 65 20 | 75 73 65 64 20 69 66 20 |will be |used if |
|00001d20| 61 20 6e 65 67 61 74 69 | 76 65 20 6e 75 6d 62 65 |a negati|ve numbe|
|00001d30| 72 20 69 73 0a 65 6e 74 | 65 72 65 64 20 66 6f 72 |r is.ent|ered for|
|00001d40| 20 74 68 65 20 65 6e 64 | 2d 6f 66 2d 6c 69 6e 65 | the end|-of-line|
|00001d50| 20 63 68 61 72 61 63 74 | 65 72 2e 20 53 65 65 20 | charact|er. See |
|00001d60| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 7b |descript|ion of {|
|00001d70| 5c 74 74 20 65 6f 6c 43 | 68 61 72 7d 0a 66 69 65 |\tt eolC|har}.fie|
|00001d80| 6c 64 20 61 62 6f 76 65 | 2e 0a 0a 5c 69 74 65 6d |ld above|...\item|
|00001d90| 20 49 6e 20 6e 6f 6e 2d | 63 61 6e 6f 6e 69 63 61 | In non-|canonica|
|00001da0| 6c 20 69 6e 70 75 74 20 | 70 72 6f 63 65 73 73 69 |l input |processi|
|00001db0| 6e 67 2c 20 74 68 65 20 | 69 6e 69 74 69 61 6c 20 |ng, the |initial |
|00001dc0| 76 61 6c 75 65 73 20 66 | 6f 72 20 7b 5c 74 74 0a |values f|or {\tt.|
|00001dd0| 4d 49 4e 7d 20 61 6e 64 | 20 7b 5c 74 74 20 54 49 |MIN} and| {\tt TI|
|00001de0| 4d 45 7d 20 61 72 65 3a | 0a 0a 5c 62 65 67 69 6e |ME} are:|..\begin|
|00001df0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 20 20 20 20 20 |{verbati|m}. |
|00001e00| 20 20 20 63 5f 63 63 5b | 56 4d 49 4e 5d 20 3d 20 | c_cc[|VMIN] = |
|00001e10| 31 20 61 6e 64 20 63 5f | 63 63 5b 56 54 49 4d 45 |1 and c_|cc[VTIME|
|00001e20| 5d 20 3d 20 30 0a 0a 5c | 65 6e 64 7b 76 65 72 62 |] = 0..\|end{verb|
|00001e30| 61 74 69 6d 7d 0a 0a 54 | 68 69 73 20 6d 65 61 6e |atim}..T|his mean|
|00001e40| 73 20 74 68 61 74 20 74 | 68 65 20 72 65 61 64 28 |s that t|he read(|
|00001e50| 29 20 66 75 6e 63 74 69 | 6f 6e 20 62 6c 6f 63 6b |) functi|on block|
|00001e60| 73 20 75 6e 74 69 6c 20 | 61 74 20 6c 65 61 73 74 |s until |at least|
|00001e70| 20 31 20 63 68 61 72 61 | 63 74 65 72 20 69 73 0a | 1 chara|cter is.|
|00001e80| 72 65 63 65 69 76 65 64 | 2e 20 20 50 6c 65 61 73 |received|. Pleas|
|00001e90| 65 20 72 65 61 64 20 74 | 68 65 20 6d 61 6e 20 70 |e read t|he man p|
|00001ea0| 61 67 65 73 20 6f 6e 20 | 7b 5c 74 74 20 74 65 72 |ages on |{\tt ter|
|00001eb0| 6d 69 6f 28 34 29 7d 20 | 66 6f 72 20 6d 6f 72 65 |mio(4)} |for more|
|00001ec0| 0a 64 65 74 61 69 6c 73 | 2e 0a 0a 5c 65 6e 64 7b |.details|...\end{|
|00001ed0| 65 6e 75 6d 65 72 61 74 | 65 7d 0a 0a 48 65 72 65 |enumerat|e}..Here|
|00001ee0| 20 61 72 65 20 74 77 6f | 20 73 61 6d 70 6c 65 20 | are two| sample |
|00001ef0| 64 65 76 69 63 65 20 63 | 6f 6e 66 69 67 75 72 61 |device c|onfigura|
|00001f00| 74 69 6f 6e 73 2c 20 62 | 6f 74 68 20 74 61 6b 65 |tions, b|oth take|
|00001f10| 6e 20 66 72 6f 6d 20 74 | 68 65 20 7b 5c 74 74 0a |n from t|he {\tt.|
|00001f20| 76 69 64 65 6f 4f 62 6a | 65 63 74 73 2e 63 7d 20 |videoObj|ects.c} |
|00001f30| 66 69 6c 65 20 66 6f 72 | 20 74 68 65 20 56 69 64 |file for| the Vid|
|00001f40| 65 6f 45 64 69 74 20 61 | 70 70 6c 69 63 61 74 69 |eoEdit a|pplicati|
|00001f50| 6f 6e 2e 20 20 54 68 65 | 20 66 69 72 73 74 20 64 |on. The| first d|
|00001f60| 65 73 63 72 69 62 65 73 | 0a 74 68 65 20 50 69 6f |escribes|.the Pio|
|00001f70| 6e 65 65 72 20 34 32 30 | 30 20 76 69 64 65 6f 64 |neer 420|0 videod|
|00001f80| 69 73 63 20 70 6c 61 79 | 65 72 2e 20 20 54 68 65 |isc play|er. The|
|00001f90| 20 73 65 63 6f 6e 64 20 | 63 6f 6e 66 69 67 75 72 | second |configur|
|00001fa0| 61 74 69 6f 6e 20 64 65 | 73 63 72 69 62 65 73 0a |ation de|scribes.|
|00001fb0| 74 68 65 20 53 6f 6e 79 | 20 31 35 35 30 20 76 69 |the Sony| 1550 vi|
|00001fc0| 64 65 6f 64 69 73 63 20 | 70 6c 61 79 65 72 2e 20 |deodisc |player. |
|00001fd0| 20 41 20 74 61 62 6c 65 | 20 66 6f 72 20 41 53 43 | A table| for ASC|
|00001fe0| 49 49 20 76 61 6c 75 65 | 73 20 63 61 6e 20 62 65 |II value|s can be|
|00001ff0| 20 66 6f 75 6e 64 0a 69 | 6e 20 5c 72 65 66 7b 41 | found.i|n \ref{A|
|00002000| 53 43 49 49 54 61 62 6c | 65 7d 2e 0a 0a 5c 62 65 |SCIITabl|e}...\be|
|00002010| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 20 0a 20 |gin{verb|atim} . |
|00002020| 20 20 20 20 20 73 74 61 | 74 69 63 20 43 6f 6e 66 | sta|tic Conf|
|00002030| 69 67 20 50 69 6f 6e 65 | 65 72 34 32 30 30 43 6f |ig Pione|er4200Co|
|00002040| 6e 66 69 67 20 3d 20 20 | 20 20 20 20 20 20 20 20 |nfig = | |
|00002050| 20 20 20 20 20 20 20 20 | 20 20 20 20 0a 20 20 20 | | . |
|00002060| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 22 50 69 | {. | "Pi|
|00002070| 6f 6e 65 65 72 34 32 30 | 30 22 2c 20 20 20 20 20 |oneer420|0", |
|00002080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3c 3d 20 | | <= |
|00002090| 6d 6f 64 65 6c 4e 61 6d | 65 0a 20 20 20 20 20 20 |modelNam|e. |
|000020a0| 20 20 22 2f 64 65 76 2f | 74 74 79 61 22 2c 20 20 | "/dev/|ttya", |
|000020b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020c0| 20 20 3c 3d 20 73 65 72 | 69 61 6c 20 50 6f 72 74 | <= ser|ial Port|
|000020d0| 0a 20 20 20 20 20 20 20 | 20 34 38 30 30 2c 20 20 |. | 4800, |
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020f0| 20 0a 20 20 20 20 20 20 | 20 20 31 30 2c 20 20 20 | . | 10, |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002110| 20 20 20 20 20 20 20 20 | 20 20 3c 3d 20 4e 4c 20 | | <= NL |
|00002120| 28 41 53 43 49 49 20 31 | 30 29 20 69 73 20 74 68 |(ASCII 1|0) is th|
|00002130| 65 20 65 6f 6c 43 68 61 | 72 20 0a 20 20 20 20 20 |e eolCha|r . |
|00002140| 20 20 20 38 2c 20 20 20 | 20 20 20 20 20 20 20 20 | 8, | |
|00002150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002170| 20 20 20 66 6f 72 20 50 | 69 6f 6e 65 65 72 34 32 | for P|ioneer42|
|00002180| 30 30 0a 20 20 20 20 20 | 20 20 20 45 76 65 6e 2c |00. | Even,|
|00002190| 0a 20 20 20 20 20 20 20 | 20 59 65 73 2c 0a 20 20 |. | Yes,. |
|000021a0| 20 20 20 20 20 20 31 32 | 30 2c 0a 20 20 20 20 20 | 12|0,. |
|000021b0| 20 20 20 2d 31 0a 20 20 | 20 20 20 20 20 20 7d 0a | -1. | }.|
|000021c0| 20 20 20 20 20 20 20 20 | 3b 0a 0a 20 20 20 20 20 | |;.. |
|000021d0| 20 73 74 61 74 69 63 20 | 43 6f 6e 66 69 67 20 53 | static |Config S|
|000021e0| 6f 6e 79 31 35 35 30 43 | 6f 6e 66 69 67 20 3d 20 |ony1550C|onfig = |
|000021f0| 0a 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 |. {|. |
|00002200| 20 22 53 6f 6e 79 31 35 | 35 30 22 2c 0a 20 20 20 | "Sony15|50",. |
|00002210| 20 20 20 20 20 22 2f 64 | 65 76 2f 74 74 79 62 22 | "/d|ev/ttyb"|
|00002220| 2c 0a 20 20 20 20 20 20 | 20 20 32 34 30 30 2c 0a |,. | 2400,.|
|00002230| 20 20 20 20 20 20 20 20 | 2d 31 2c 20 20 20 20 20 | |-1, |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002250| 20 20 20 20 20 20 20 20 | 3c 3d 20 6e 6f 6e 2d 63 | |<= non-c|
|00002260| 61 6e 6f 6e 69 63 61 6c | 20 69 6e 70 75 74 20 70 |anonical| input p|
|00002270| 72 6f 63 65 73 73 69 6e | 67 0a 20 20 20 20 20 20 |rocessin|g. |
|00002280| 20 20 38 2c 0a 20 20 20 | 20 20 20 20 20 45 76 65 | 8,. | Eve|
|00002290| 6e 2c 0a 20 20 20 20 20 | 20 20 20 59 65 73 2c 0a |n,. | Yes,.|
|000022a0| 20 20 20 20 20 20 20 20 | 39 30 2c 20 0a 20 20 20 | |90, . |
|000022b0| 20 20 20 20 20 2d 31 0a | 20 20 20 20 20 20 20 20 | -1.| |
|000022c0| 7d 0a 20 20 20 20 20 20 | 20 20 3b 0a 5c 65 6e 64 |}. | ;.\end|
|000022d0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 0a 5c 73 75 62 |{verbati|m}..\sub|
|000022e0| 73 65 63 74 69 6f 6e 7b | 4e 6f 74 65 73 20 6f 6e |section{|Notes on|
|000022f0| 20 43 68 61 6e 67 69 6e | 67 20 74 68 65 20 43 6f | Changin|g the Co|
|00002300| 6e 66 69 67 75 72 61 74 | 69 6f 6e 7d 0a 0a 7b 5c |nfigurat|ion}..{\|
|00002310| 74 74 20 76 69 64 65 6f | 4f 62 6a 65 63 74 73 2e |tt video|Objects.|
|00002320| 63 7d 20 69 73 20 74 68 | 65 20 66 69 6c 65 20 74 |c} is th|e file t|
|00002330| 68 61 74 20 73 74 6f 72 | 65 73 20 74 68 65 20 63 |hat stor|es the c|
|00002340| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 73 20 66 6f |onfigura|tions fo|
|00002350| 72 20 65 61 63 68 0a 64 | 65 76 69 63 65 20 69 6e |r each.d|evice in|
|00002360| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | an appl|ication |
|00002370| 28 73 65 65 20 5c 72 65 | 66 7b 56 69 64 65 6f 4c |(see \re|f{VideoL|
|00002380| 69 62 72 61 72 79 46 69 | 6c 65 73 7d 29 2e 20 54 |ibraryFi|les}). T|
|00002390| 6f 20 75 73 65 20 74 68 | 65 20 56 69 64 65 6f 0a |o use th|e Video.|
|000023a0| 4c 69 62 72 61 72 79 2c | 20 63 6f 70 79 20 74 68 |Library,| copy th|
|000023b0| 69 73 20 66 69 6c 65 20 | 69 6e 74 6f 20 79 6f 75 |is file |into you|
|000023c0| 72 20 6f 77 6e 20 64 69 | 72 65 63 74 6f 72 79 20 |r own di|rectory |
|000023d0| 61 6e 64 20 63 6f 6d 70 | 69 6c 65 20 69 74 20 77 |and comp|ile it w|
|000023e0| 69 74 68 20 74 68 65 0a | 72 65 73 74 20 6f 66 20 |ith the.|rest of |
|000023f0| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|00002400| 2e 20 20 41 6e 79 20 63 | 68 61 6e 67 65 73 20 79 |. Any c|hanges y|
|00002410| 6f 75 20 77 69 73 68 20 | 74 6f 20 6d 61 6b 65 20 |ou wish |to make |
|00002420| 74 6f 20 76 69 64 65 6f | 20 64 65 76 69 63 65 0a |to video| device.|
|00002430| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 73 20 63 |configur|ations c|
|00002440| 61 6e 20 62 65 20 6d 61 | 64 65 20 69 6e 20 79 6f |an be ma|de in yo|
|00002450| 75 72 20 63 6f 70 79 20 | 6f 66 20 74 68 65 20 7b |ur copy |of the {|
|00002460| 5c 74 74 20 76 69 64 65 | 6f 4f 62 6a 65 63 74 73 |\tt vide|oObjects|
|00002470| 2e 63 7d 0a 66 69 6c 65 | 2e 20 20 49 66 20 79 6f |.c}.file|. If yo|
|00002480| 75 20 61 72 65 20 75 73 | 69 6e 67 20 6f 6e 65 20 |u are us|ing one |
|00002490| 6f 66 20 74 68 65 20 61 | 6c 72 65 61 64 79 2d 73 |of the a|lready-s|
|000024a0| 75 70 70 6c 69 65 64 20 | 64 65 76 69 63 65 73 2c |upplied |devices,|
|000024b0| 20 74 68 65 20 6f 6e 6c | 79 0a 73 65 74 74 69 6e | the onl|y.settin|
|000024c0| 67 20 79 6f 75 20 6d 69 | 67 68 74 20 6c 69 6b 65 |g you mi|ght like|
|000024d0| 6c 79 20 63 68 61 6e 67 | 65 20 69 73 20 74 68 65 |ly chang|e is the|
|000024e0| 20 73 65 72 69 61 6c 20 | 70 6f 72 74 20 74 6f 20 | serial |port to |
|000024f0| 77 68 69 63 68 20 74 68 | 65 20 64 65 76 69 63 65 |which th|e device|
|00002500| 0a 69 73 20 63 6f 6e 6e | 65 63 74 65 64 2c 20 61 |.is conn|ected, a|
|00002510| 6e 64 20 65 76 65 6e 20 | 74 68 69 73 20 6d 61 79 |nd even |this may|
|00002520| 20 6e 6f 74 20 62 65 20 | 6e 65 63 65 73 73 61 72 | not be |necessar|
|00002530| 79 2e 0a 0a 53 65 65 20 | 74 68 65 20 65 6e 64 20 |y...See |the end |
|00002540| 6f 66 20 74 68 65 20 7b | 5c 74 74 20 76 69 64 65 |of the {|\tt vide|
|00002550| 6f 4f 62 6a 2e 68 7d 20 | 66 69 6c 65 20 66 6f 72 |oObj.h} |file for|
|00002560| 20 61 20 6c 69 73 74 20 | 6f 66 20 64 65 76 69 63 | a list |of devic|
|00002570| 65 0a 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 73 |e.config|urations|
|00002580| 20 66 6f 72 20 63 75 72 | 72 65 6e 74 6c 79 2d 73 | for cur|rently-s|
|00002590| 75 70 70 6f 72 74 65 64 | 20 64 65 76 69 63 65 73 |upported| devices|
|000025a0| 2e 0a 0a 54 68 65 20 73 | 65 72 69 61 6c 20 6c 69 |...The s|erial li|
|000025b0| 6e 65 20 69 73 20 73 65 | 74 20 62 79 20 7b 5c 74 |ne is se|t by {\t|
|000025c0| 74 20 53 65 74 53 65 72 | 69 61 6c 4c 69 6e 65 28 |t SetSer|ialLine(|
|000025d0| 29 7d 2c 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 73 |)}, a fu|nction s|
|000025e0| 75 70 70 6c 69 65 64 20 | 62 79 0a 74 68 65 20 56 |upplied |by.the V|
|000025f0| 69 64 65 6f 20 4c 69 62 | 72 61 72 79 2e 20 20 7b |ideo Lib|rary. {|
|00002600| 5c 74 74 20 53 65 74 53 | 65 72 69 61 6c 4c 69 6e |\tt SetS|erialLin|
|00002610| 65 28 29 7d 20 68 61 73 | 20 74 77 6f 20 61 72 67 |e()} has| two arg|
|00002620| 75 6d 65 6e 74 73 3a 0a | 0a 5c 62 65 67 69 6e 7b |uments:.|.\begin{|
|00002630| 65 6e 75 6d 65 72 61 74 | 65 7d 0a 5c 69 74 65 6d |enumerat|e}.\item|
|00002640| 20 44 65 76 69 63 65 20 | 63 6f 6e 66 69 67 75 72 | Device |configur|
|00002650| 61 74 69 6f 6e 20 73 74 | 72 75 63 74 75 72 65 0a |ation st|ructure.|
|00002660| 5c 69 74 65 6d 20 53 65 | 72 69 61 6c 20 70 6f 72 |\item Se|rial por|
|00002670| 74 0a 5c 65 6e 64 7b 65 | 6e 75 6d 65 72 61 74 65 |t.\end{e|numerate|
|00002680| 7d 0a 0a 42 65 63 61 75 | 73 65 20 74 68 65 20 7b |}..Becau|se the {|
|00002690| 5c 74 74 20 73 65 72 69 | 61 6c 50 6f 72 74 7d 20 |\tt seri|alPort} |
|000026a0| 66 69 65 6c 64 20 69 73 | 20 6c 69 6b 65 6c 79 20 |field is| likely |
|000026b0| 74 6f 20 64 69 66 66 65 | 72 20 66 72 6f 6d 20 6d |to diffe|r from m|
|000026c0| 61 63 68 69 6e 65 20 74 | 6f 0a 6d 61 63 68 69 6e |achine t|o.machin|
|000026d0| 65 2c 20 74 68 65 20 56 | 69 64 65 6f 20 4f 62 6a |e, the V|ideo Obj|
|000026e0| 65 63 74 20 63 68 6f 6f | 73 65 73 20 74 68 65 20 |ect choo|ses the |
|000026f0| 73 65 72 69 61 6c 20 70 | 6f 72 74 20 74 6f 20 63 |serial p|ort to c|
|00002700| 6f 6e 6e 65 63 74 20 77 | 69 74 68 20 62 79 0a 75 |onnect w|ith by.u|
|00002710| 73 69 6e 67 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |sing the| followi|
|00002720| 6e 67 20 70 72 6f 63 65 | 64 75 72 65 3a 0a 0a 5c |ng proce|dure:..\|
|00002730| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 5c |begin{it|emize}.\|
|00002740| 69 74 65 6d 20 55 73 65 | 20 74 68 65 20 73 65 63 |item Use| the sec|
|00002750| 6f 6e 64 20 61 72 67 75 | 6d 65 6e 74 20 74 6f 20 |ond argu|ment to |
|00002760| 7b 5c 74 74 20 53 65 74 | 53 65 72 69 61 6c 4c 69 |{\tt Set|SerialLi|
|00002770| 6e 65 28 29 7d 20 69 66 | 20 69 74 20 69 73 20 6e |ne()} if| it is n|
|00002780| 6f 74 20 4e 55 4c 4c 2e | 0a 7b 5c 74 74 20 53 65 |ot NULL.|.{\tt Se|
|00002790| 74 53 65 72 69 61 6c 4c | 69 6e 65 28 29 7d 20 73 |tSerialL|ine()} s|
|000027a0| 68 6f 75 6c 64 2c 20 69 | 6e 20 67 65 6e 65 72 61 |hould, i|n genera|
|000027b0| 6c 2c 20 62 65 20 63 61 | 6c 6c 65 64 20 77 69 74 |l, be ca|lled wit|
|000027c0| 68 20 4e 55 4c 4c 20 61 | 73 20 74 68 65 0a 73 65 |h NULL a|s the.se|
|000027d0| 63 6f 6e 64 20 61 72 67 | 75 6d 65 6e 74 2c 20 62 |cond arg|ument, b|
|000027e0| 65 63 61 75 73 65 20 69 | 6e 20 74 68 65 20 6d 6f |ecause i|n the mo|
|000027f0| 73 74 20 63 61 73 65 73 | 2c 20 74 68 65 20 73 65 |st cases|, the se|
|00002800| 72 69 61 6c 20 70 6f 72 | 74 20 69 73 20 6e 6f 74 |rial por|t is not|
|00002810| 0a 65 78 70 6c 69 63 69 | 74 6c 79 20 63 68 6f 73 |.explici|tly chos|
|00002820| 65 6e 2e 20 20 54 68 65 | 20 73 65 63 6f 6e 64 20 |en. The| second |
|00002830| 61 72 67 75 6d 65 6e 74 | 20 73 68 6f 75 6c 64 20 |argument| should |
|00002840| 62 65 20 6e 6f 6e 2d 4e | 55 4c 4c 2c 20 6f 6e 6c |be non-N|ULL, onl|
|00002850| 79 20 77 68 65 6e 0a 74 | 68 65 20 75 73 65 72 20 |y when.t|he user |
|00002860| 73 70 65 63 69 66 69 65 | 73 20 66 72 6f 6d 20 77 |specifie|s from w|
|00002870| 69 74 68 69 6e 20 74 68 | 65 20 61 70 70 6c 69 63 |ithin th|e applic|
|00002880| 61 74 69 6f 6e 20 61 20 | 70 61 72 74 69 63 75 6c |ation a |particul|
|00002890| 61 72 20 73 65 72 69 61 | 6c 0a 70 6f 72 74 20 74 |ar seria|l.port t|
|000028a0| 6f 20 75 73 65 2e 0a 0a | 5c 69 74 65 6d 20 43 61 |o use...|\item Ca|
|000028b0| 6c 6c 20 7b 5c 74 74 20 | 58 47 65 74 44 65 66 61 |ll {\tt |XGetDefa|
|000028c0| 75 6c 74 28 29 7d 2e 20 | 20 49 66 20 69 74 20 72 |ult()}. | If it r|
|000028d0| 65 74 75 72 6e 73 20 61 | 20 6e 6f 6e 2d 4e 55 4c |eturns a| non-NUL|
|000028e0| 4c 20 76 61 6c 75 65 20 | 66 6f 72 20 74 68 65 0a |L value |for the.|
|000028f0| 73 65 72 69 61 6c 20 70 | 6f 72 74 20 66 6f 72 20 |serial p|ort for |
|00002900| 74 68 69 73 20 64 65 76 | 69 63 65 2c 20 74 68 65 |this dev|ice, the|
|00002910| 6e 20 75 73 65 20 74 68 | 69 73 20 76 61 6c 75 65 |n use th|is value|
|00002920| 2e 0a 0a 5c 69 74 65 6d | 20 55 73 65 20 74 68 65 |...\item| Use the|
|00002930| 20 76 61 6c 75 65 20 73 | 65 74 20 69 6e 20 74 68 | value s|et in th|
|00002940| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|00002950| 73 74 72 75 63 74 75 72 | 65 2e 0a 0a 5c 65 6e 64 |structur|e...\end|
|00002960| 7b 69 74 65 6d 69 7a 65 | 7d 0a 0a 54 68 75 73 2c |{itemize|}..Thus,|
|00002970| 20 74 6f 20 63 68 61 6e | 67 65 20 73 65 72 69 61 | to chan|ge seria|
|00002980| 6c 20 70 6f 72 74 20 77 | 69 74 68 6f 75 74 20 6d |l port w|ithout m|
|00002990| 6f 64 69 66 79 69 6e 67 | 20 61 6e 79 20 63 6f 64 |odifying| any cod|
|000029a0| 65 2c 20 69 74 20 69 73 | 20 65 61 73 69 65 73 74 |e, it is| easiest|
|000029b0| 0a 74 6f 20 73 65 74 20 | 74 68 65 20 64 65 66 61 |.to set |the defa|
|000029c0| 75 6c 74 20 73 65 72 69 | 61 6c 20 70 6f 72 74 20 |ult seri|al port |
|000029d0| 69 6e 20 7b 5c 74 74 7e | 2f 2e 58 64 65 66 61 75 |in {\tt~|/.Xdefau|
|000029e0| 6c 74 73 7d 2e 0a 0a 48 | 65 72 65 20 69 73 20 61 |lts}...H|ere is a|
|000029f0| 6e 20 65 78 61 6d 70 6c | 65 20 58 20 72 65 73 6f |n exampl|e X reso|
|00002a00| 75 72 63 65 20 73 68 6f | 77 69 6e 67 20 68 6f 77 |urce sho|wing how|
|00002a10| 20 61 20 75 73 65 72 20 | 6d 69 67 68 74 20 73 65 | a user |might se|
|00002a20| 74 20 74 68 65 20 64 65 | 66 61 75 6c 74 0a 73 65 |t the de|fault.se|
|00002a30| 72 69 61 6c 20 70 6f 72 | 74 20 75 73 65 64 20 62 |rial por|t used b|
|00002a40| 79 20 74 68 65 20 50 69 | 6f 6e 65 65 72 34 32 30 |y the Pi|oneer420|
|00002a50| 30 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 3a |0 device| driver:|
|00002a60| 0a 0a 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |..\begin|{verbati|
|00002a70| 6d 7d 0a 20 20 20 50 69 | 6f 6e 65 65 72 34 32 30 |m}. Pi|oneer420|
|00002a80| 30 2e 73 65 72 69 61 6c | 50 6f 72 74 3a 20 20 20 |0.serial|Port: |
|00002a90| 20 20 20 2f 64 65 76 2f | 74 74 79 61 20 20 20 20 | /dev/|ttya |
|00002aa0| 20 20 20 3c 3d 20 50 69 | 6f 6e 65 65 72 34 32 30 | <= Pi|oneer420|
|00002ab0| 30 20 70 6c 61 79 65 72 | 20 0a 20 20 20 20 20 20 |0 player| . |
|00002ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 73 20 | | is |
|00002af0| 6f 6e 20 2f 64 65 76 2f | 74 74 79 61 0a 5c 65 6e |on /dev/|ttya.\en|
|00002b00| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 0a 0a 5c 73 |d{verbat|im}...\s|
|00002b10| 75 62 73 65 63 74 69 6f | 6e 7b 44 65 66 69 6e 69 |ubsectio|n{Defini|
|00002b20| 74 69 6f 6e 20 6f 66 20 | 56 69 64 65 6f 20 4f 62 |tion of |Video Ob|
|00002b30| 6a 65 63 74 20 46 75 6e | 63 74 69 6f 6e 73 7d 0a |ject Fun|ctions}.|
|00002b40| 5c 6c 61 62 65 6c 7b 44 | 65 66 69 6e 69 6e 67 56 |\label{D|efiningV|
|00002b50| 69 64 65 6f 4f 62 6a 65 | 63 74 46 75 6e 63 74 69 |ideoObje|ctFuncti|
|00002b60| 6f 6e 73 7d 0a 0a 54 68 | 65 20 56 69 64 65 6f 20 |ons}..Th|e Video |
|00002b70| 4f 62 6a 65 63 74 20 68 | 61 73 20 61 74 20 70 72 |Object h|as at pr|
|00002b80| 65 73 65 6e 74 20 32 33 | 20 62 61 73 69 63 20 66 |esent 23| basic f|
|00002b90| 75 6e 63 74 69 6f 6e 73 | 2e 20 4e 6f 74 20 61 6c |unctions|. Not al|
|00002ba0| 6c 20 64 65 76 69 63 65 | 73 0a 77 69 6c 6c 20 62 |l device|s.will b|
|00002bb0| 65 20 61 62 6c 65 20 74 | 6f 20 70 65 72 66 6f 72 |e able t|o perfor|
|00002bc0| 6d 20 61 6c 6c 20 32 33 | 20 66 75 6e 63 74 69 6f |m all 23| functio|
|00002bd0| 6e 73 3b 20 73 75 63 68 | 20 64 65 76 69 63 65 73 |ns; such| devices|
|00002be0| 20 77 69 6c 6c 20 68 61 | 76 65 20 4e 55 4c 4c 0a | will ha|ve NULL.|
|00002bf0| 66 75 6e 63 74 69 6f 6e | 20 70 6f 69 6e 74 65 72 |function| pointer|
|00002c00| 73 20 66 6f 72 20 74 68 | 6f 73 65 20 66 75 6e 63 |s for th|ose func|
|00002c10| 74 69 6f 6e 73 20 74 68 | 65 79 20 63 61 6e 6e 6f |tions th|ey canno|
|00002c20| 74 20 70 65 72 66 6f 72 | 6d 2e 0a 0a 54 68 65 20 |t perfor|m...The |
|00002c30| 7b 5c 74 74 20 56 69 64 | 65 6f 4f 62 6a 65 63 74 |{\tt Vid|eoObject|
|00002c40| 7d 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |} data s|tructure|
|00002c50| 20 69 73 20 64 65 66 69 | 6e 65 64 20 61 73 20 66 | is defi|ned as f|
|00002c60| 6f 6c 6c 6f 77 73 3a 0a | 0a 5c 62 65 67 69 6e 7b |ollows:.|.\begin{|
|00002c70| 76 65 72 62 61 74 69 6d | 7d 0a 20 20 20 20 20 20 |verbatim|}. |
|00002c80| 20 20 74 79 70 65 64 65 | 66 20 73 74 72 75 63 74 | typede|f struct|
|00002c90| 20 5f 56 69 64 65 6f 4f | 62 6a 65 63 74 20 0a 20 | _VideoO|bject . |
|00002ca0| 20 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 | {|. |
|00002cb0| 20 20 20 43 6f 6e 66 69 | 67 2a 20 44 65 76 43 6f | Confi|g* DevCo|
|00002cc0| 6e 66 69 67 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |nfig;. | |
|00002cd0| 69 6e 74 20 28 2a 44 65 | 76 50 6c 61 79 50 74 72 |int (*De|vPlayPtr|
|00002ce0| 29 20 28 56 69 64 65 6f | 4f 62 6a 65 63 74 2a 29 |) (Video|Object*)|
|00002cf0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 69 6e 74 20 |;. | int |
|00002d00| 28 2a 44 65 76 50 6c 61 | 79 46 72 6f 6d 54 6f 50 |(*DevPla|yFromToP|
|00002d10| 74 72 29 20 28 56 69 64 | 65 6f 4f 62 6a 65 63 74 |tr) (Vid|eoObject|
|00002d20| 2a 2c 20 69 6e 74 2c 20 | 69 6e 74 2c 20 69 6e 74 |*, int, |int, int|
|00002d30| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 69 6e 74 |);. | int|
|00002d40| 20 28 2a 44 65 76 46 61 | 73 74 46 6f 72 77 61 72 | (*DevFa|stForwar|
|00002d50| 64 50 74 72 29 20 28 56 | 69 64 65 6f 4f 62 6a 65 |dPtr) (V|ideoObje|
|00002d60| 63 74 2a 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ct*);. | |
|00002d70| 69 6e 74 20 28 2a 44 65 | 76 52 65 76 65 72 73 65 |int (*De|vReverse|
|00002d80| 50 74 72 29 20 28 56 69 | 64 65 6f 4f 62 6a 65 63 |Ptr) (Vi|deoObjec|
|00002d90| 74 2a 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 69 |t*);. | i|
|00002da0| 6e 74 20 28 2a 44 65 76 | 43 61 6c 63 53 70 65 65 |nt (*Dev|CalcSpee|
|00002db0| 64 50 74 72 29 20 28 56 | 69 64 65 6f 4f 62 6a 65 |dPtr) (V|ideoObje|
|00002dc0| 63 74 2a 2c 20 69 6e 74 | 2c 20 69 6e 74 29 3b 0a |ct*, int|, int);.|
|00002dd0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 28 2a | | int (*|
|00002de0| 44 65 76 50 6c 61 79 41 | 74 53 70 65 65 64 44 69 |DevPlayA|tSpeedDi|
|00002df0| 72 50 74 72 29 20 28 56 | 69 64 65 6f 4f 62 6a 65 |rPtr) (V|ideoObje|
|00002e00| 63 74 2a 2c 20 69 6e 74 | 2c 20 65 6e 75 6d 20 44 |ct*, int|, enum D|
|00002e10| 69 72 65 63 74 69 6f 6e | 29 3b 0a 20 20 20 20 20 |irection|);. |
|00002e20| 20 20 20 20 20 69 6e 74 | 20 28 2a 44 65 76 53 74 | int| (*DevSt|
|00002e30| 65 70 50 74 72 29 20 28 | 56 69 64 65 6f 4f 62 6a |epPtr) (|VideoObj|
|00002e40| 65 63 74 2a 2c 20 65 6e | 75 6d 20 44 69 72 65 63 |ect*, en|um Direc|
|00002e50| 74 69 6f 6e 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |tion);. | |
|00002e60| 20 69 6e 74 20 28 2a 44 | 65 76 53 74 69 6c 6c 50 | int (*D|evStillP|
|00002e70| 74 72 29 20 28 56 69 64 | 65 6f 4f 62 6a 65 63 74 |tr) (Vid|eoObject|
|00002e80| 2a 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 69 6e |*);. | in|
|00002e90| 74 20 28 2a 44 65 76 53 | 74 6f 70 50 74 72 29 20 |t (*DevS|topPtr) |
|00002ea0| 28 56 69 64 65 6f 4f 62 | 6a 65 63 74 2a 29 3b 0a |(VideoOb|ject*);.|
|00002eb0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 28 2a | | int (*|
|00002ec0| 44 65 76 53 65 74 44 65 | 66 61 75 6c 74 73 50 74 |DevSetDe|faultsPt|
|00002ed0| 72 29 20 28 56 69 64 65 | 6f 4f 62 6a 65 63 74 2a |r) (Vide|oObject*|
|00002ee0| 2c 20 69 6e 74 2c 20 69 | 6e 74 2c 20 69 6e 74 2c |, int, i|nt, int,|
|00002ef0| 20 69 6e 74 29 3b 0a 20 | 20 20 20 20 20 20 20 20 | int);. | |
|00002f00| 20 69 6e 74 20 28 2a 44 | 65 76 53 65 74 41 75 64 | int (*D|evSetAud|
|00002f10| 69 6f 50 74 72 29 20 28 | 56 69 64 65 6f 4f 62 6a |ioPtr) (|VideoObj|
|00002f20| 65 63 74 2a 2c 20 69 6e | 74 29 3b 0a 20 20 20 20 |ect*, in|t);. |
|00002f30| 20 20 20 20 20 20 69 6e | 74 20 28 2a 44 65 76 53 | in|t (*DevS|
|00002f40| 65 74 56 69 64 65 6f 50 | 74 72 29 20 28 56 69 64 |etVideoP|tr) (Vid|
|00002f50| 65 6f 4f 62 6a 65 63 74 | 2a 2c 20 69 6e 74 29 3b |eoObject|*, int);|
|00002f60| 0a 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 20 28 |. | int (|
|00002f70| 2a 44 65 76 53 65 74 41 | 64 64 4d 6f 64 65 50 74 |*DevSetA|ddModePt|
|00002f80| 72 29 20 28 56 69 64 65 | 6f 4f 62 6a 65 63 74 2a |r) (Vide|oObject*|
|00002f90| 2c 20 69 6e 74 29 3b 0a | 20 20 20 20 20 20 20 20 |, int);.| |
|00002fa0| 20 20 69 6e 74 20 28 2a | 44 65 76 53 65 74 41 64 | int (*|DevSetAd|
|00002fb0| 64 72 65 73 73 44 69 73 | 70 6c 61 79 50 74 72 29 |dressDis|playPtr)|
|00002fc0| 20 28 56 69 64 65 6f 4f | 62 6a 65 63 74 2a 2c 20 | (VideoO|bject*, |
|00002fd0| 69 6e 74 2c 20 69 6e 74 | 29 3b 0a 20 20 20 20 20 |int, int|);. |
|00002fe0| 20 20 20 20 20 69 6e 74 | 20 28 2a 44 65 76 45 6a | int| (*DevEj|
|00002ff0| 65 63 74 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |ectPtr) |(VideoOb|
|00003000| 6a 65 63 74 2a 29 3b 0a | 20 20 20 20 20 20 20 20 |ject*);.| |
|00003010| 20 20 69 6e 74 20 28 2a | 44 65 76 50 6f 77 65 72 | int (*|DevPower|
|00003020| 50 74 72 29 20 28 56 69 | 64 65 6f 4f 62 6a 65 63 |Ptr) (Vi|deoObjec|
|00003030| 74 2a 2c 20 69 6e 74 29 | 3b 0a 20 20 20 20 20 20 |t*, int)|;. |
|00003040| 20 20 20 20 69 6e 74 20 | 28 2a 44 65 76 51 75 65 | int |(*DevQue|
|00003050| 72 79 46 72 61 6d 65 50 | 74 72 29 20 28 56 69 64 |ryFrameP|tr) (Vid|
|00003060| 65 6f 4f 62 6a 65 63 74 | 2a 29 3b 0a 20 20 20 20 |eoObject|*);. |
|00003070| 20 20 20 20 20 20 69 6e | 74 20 28 2a 44 65 76 51 | in|t (*DevQ|
|00003080| 75 65 72 79 43 68 61 70 | 74 65 72 50 74 72 29 20 |ueryChap|terPtr) |
|00003090| 28 56 69 64 65 6f 4f 62 | 6a 65 63 74 2a 29 3b 0a |(VideoOb|ject*);.|
|000030a0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 28 2a | | int (*|
|000030b0| 44 65 76 51 75 65 72 79 | 41 75 64 69 6f 50 74 72 |DevQuery|AudioPtr|
|000030c0| 29 20 28 56 69 64 65 6f | 4f 62 6a 65 63 74 2a 29 |) (Video|Object*)|
|000030d0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 69 6e 74 20 |;. | int |
|000030e0| 28 2a 44 65 76 51 75 65 | 72 79 56 69 64 65 6f 50 |(*DevQue|ryVideoP|
|000030f0| 74 72 29 20 28 56 69 64 | 65 6f 4f 62 6a 65 63 74 |tr) (Vid|eoObject|
|00003100| 2a 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 69 6e |*);. | in|
|00003110| 74 20 28 2a 44 65 76 51 | 75 65 72 79 4d 65 64 69 |t (*DevQ|ueryMedi|
|00003120| 75 6d 50 74 72 29 20 28 | 56 69 64 65 6f 4f 62 6a |umPtr) (|VideoObj|
|00003130| 65 63 74 2a 2c 20 63 68 | 61 72 2a 29 3b 0a 20 20 |ect*, ch|ar*);. |
|00003140| 20 20 20 20 20 20 20 20 | 69 6e 74 20 28 2a 44 65 | |int (*De|
|00003150| 76 51 75 65 72 79 53 74 | 61 74 75 73 50 74 72 29 |vQuerySt|atusPtr)|
|00003160| 20 28 56 69 64 65 6f 4f | 62 6a 65 63 74 2a 29 3b | (VideoO|bject*);|
|00003170| 0a 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 20 28 |. | int (|
|00003180| 2a 44 65 76 50 69 6e 67 | 50 74 72 29 20 28 56 69 |*DevPing|Ptr) (Vi|
|00003190| 64 65 6f 4f 62 6a 65 63 | 74 2a 29 3b 0a 20 20 20 |deoObjec|t*);. |
|000031a0| 20 20 20 20 20 20 20 69 | 6e 74 20 28 2a 44 65 76 | i|nt (*Dev|
|000031b0| 52 65 63 6f 72 64 50 74 | 72 29 20 28 56 69 64 65 |RecordPt|r) (Vide|
|000031c0| 6f 4f 62 6a 65 63 74 2a | 29 3b 0a 20 20 20 20 20 |oObject*|);. |
|000031d0| 20 20 20 20 20 69 6e 74 | 20 28 2a 44 65 76 52 65 | int| (*DevRe|
|000031e0| 63 6f 72 64 46 72 6f 6d | 54 6f 50 74 72 29 20 28 |cordFrom|ToPtr) (|
|000031f0| 56 69 64 65 6f 4f 62 6a | 65 63 74 2a 2c 20 69 6e |VideoObj|ect*, in|
|00003200| 74 2c 20 69 6e 74 2c 20 | 69 6e 74 29 3b 0a 20 20 |t, int, |int);. |
|00003210| 20 20 20 20 20 20 7d 20 | 56 69 64 65 6f 4f 62 6a | } |VideoObj|
|00003220| 65 63 74 3b 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 |ect;.\en|d{verbat|
|00003230| 69 6d 7d 0a 0a 42 79 20 | 63 6f 6d 70 6f 75 6e 64 |im}..By |compound|
|00003240| 69 6e 67 20 64 69 66 66 | 65 72 65 6e 74 20 66 75 |ing diff|erent fu|
|00003250| 6e 63 74 69 6f 6e 73 2c | 20 61 70 70 6c 69 63 61 |nctions,| applica|
|00003260| 74 69 6f 6e 73 20 77 69 | 6c 6c 20 62 65 20 61 62 |tions wi|ll be ab|
|00003270| 6c 65 20 74 6f 0a 61 63 | 68 69 65 76 65 20 6d 6f |le to.ac|hieve mo|
|00003280| 73 74 20 6f 66 20 74 68 | 65 20 6f 70 65 72 61 74 |st of th|e operat|
|00003290| 69 6f 6e 73 20 63 6f 6d | 6d 6f 6e 6c 79 20 64 65 |ions com|monly de|
|000032a0| 73 69 72 65 64 20 6f 66 | 20 61 20 76 69 64 65 6f |sired of| a video|
|000032b0| 20 64 65 76 69 63 65 2e | 20 54 68 65 0a 66 6f 6c | device.| The.fol|
|000032c0| 6c 6f 77 69 6e 67 20 61 | 72 65 20 74 68 65 20 64 |lowing a|re the d|
|000032d0| 65 73 63 72 69 70 74 69 | 6f 6e 73 20 6f 66 20 77 |escripti|ons of w|
|000032e0| 68 61 74 20 65 61 63 68 | 20 66 75 6e 63 74 69 6f |hat each| functio|
|000032f0| 6e 20 73 68 6f 75 6c 64 | 20 64 6f 2e 0a 0a 54 68 |n should| do...Th|
|00003300| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 72 65 74 75 |e functi|ons retu|
|00003310| 72 6e 20 61 20 73 74 61 | 74 75 73 20 63 6f 64 65 |rn a sta|tus code|
|00003320| 2c 20 75 6e 6c 65 73 73 | 20 6f 74 68 65 72 77 69 |, unless| otherwi|
|00003330| 73 65 20 73 74 61 74 65 | 64 2e 20 20 46 6f 72 20 |se state|d. For |
|00003340| 61 0a 64 65 73 63 72 69 | 70 74 69 6f 6e 20 6f 66 |a.descri|ption of|
|00003350| 20 74 68 65 20 73 74 61 | 74 75 73 20 63 6f 64 65 | the sta|tus code|
|00003360| 73 2c 20 70 6c 65 61 73 | 65 20 73 65 65 20 5c 72 |s, pleas|e see \r|
|00003370| 65 66 7b 53 74 61 74 75 | 73 41 6e 64 45 72 72 6f |ef{Statu|sAndErro|
|00003380| 72 43 6f 64 65 73 7d 2e | 0a 0a 5c 62 65 67 69 6e |rCodes}.|..\begin|
|00003390| 7b 65 6e 75 6d 65 72 61 | 74 65 7d 0a 5c 69 74 65 |{enumera|te}.\ite|
|000033a0| 6d 7b 5c 74 74 20 69 6e | 74 20 28 2a 44 65 76 50 |m{\tt in|t (*DevP|
|000033b0| 6c 61 79 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |layPtr) |(VideoOb|
|000033c0| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 29 |ject* th|eObject)|
|000033d0| 7d 0a 20 0a 50 6f 69 6e | 74 65 72 20 74 6f 20 66 |}. .Poin|ter to f|
|000033e0| 75 6e 63 74 69 6f 6e 20 | 74 68 61 74 20 73 65 74 |unction |that set|
|000033f0| 73 20 7b 5c 74 74 20 74 | 68 65 4f 62 6a 65 63 74 |s {\tt t|heObject|
|00003400| 7d 20 69 6e 20 27 70 6c | 61 79 62 61 63 6b 27 20 |} in 'pl|ayback' |
|00003410| 6d 6f 64 65 2e 0a 0a 5c | 69 74 65 6d 7b 5c 74 74 |mode...\|item{\tt|
|00003420| 20 69 6e 74 20 28 2a 44 | 65 76 50 6c 61 79 46 72 | int (*D|evPlayFr|
|00003430| 6f 6d 54 6f 29 20 28 56 | 69 64 65 6f 4f 62 6a 65 |omTo) (V|ideoObje|
|00003440| 63 74 2a 7e 74 68 65 4f | 62 6a 65 63 74 2c 20 69 |ct*~theO|bject, i|
|00003450| 6e 74 7e 73 74 61 72 74 | 41 64 64 72 65 73 73 2c |nt~start|Address,|
|00003460| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\\. | |
|00003470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003480| 20 20 20 69 6e 74 7e 65 | 6e 64 41 64 64 72 65 73 | int~e|ndAddres|
|00003490| 73 2c 20 69 6e 74 7e 73 | 70 65 65 64 49 6e 46 72 |s, int~s|peedInFr|
|000034a0| 61 6d 65 73 50 65 72 53 | 65 63 6f 6e 64 29 7d 0a |amesPerS|econd)}.|
|000034b0| 0a 50 6f 69 6e 74 65 72 | 20 74 6f 20 66 75 6e 63 |.Pointer| to func|
|000034c0| 74 69 6f 6e 20 74 68 61 | 74 20 70 6c 61 79 73 20 |tion tha|t plays |
|000034d0| 61 20 73 65 67 6d 65 6e | 74 2c 20 66 72 6f 6d 20 |a segmen|t, from |
|000034e0| 7b 5c 74 74 20 73 74 61 | 72 74 41 64 64 72 65 73 |{\tt sta|rtAddres|
|000034f0| 73 7d 20 74 6f 0a 7b 5c | 74 74 20 65 6e 64 41 64 |s} to.{\|tt endAd|
|00003500| 64 72 65 73 73 7d 2e 0a | 0a 7b 5c 74 74 20 73 74 |dress}..|.{\tt st|
|00003510| 61 72 74 41 64 64 72 65 | 73 73 7d 20 61 6e 64 20 |artAddre|ss} and |
|00003520| 7b 5c 74 74 20 65 6e 64 | 41 64 64 72 65 73 73 7d |{\tt end|Address}|
|00003530| 20 61 72 65 20 69 6e 20 | 74 65 72 6d 73 20 6f 66 | are in |terms of|
|00003540| 20 66 72 61 6d 65 73 20 | 69 66 20 74 68 65 0a 70 | frames |if the.p|
|00003550| 6c 61 79 65 72 20 69 73 | 20 69 6e 20 66 72 61 6d |layer is| in fram|
|00003560| 65 20 6d 6f 64 65 2c 20 | 61 6e 64 20 69 6e 20 74 |e mode, |and in t|
|00003570| 65 72 6d 73 20 6f 66 20 | 63 68 61 70 74 65 72 73 |erms of |chapters|
|00003580| 20 69 66 20 74 68 65 20 | 70 6c 61 79 65 72 20 69 | if the |player i|
|00003590| 73 20 69 6e 0a 63 68 61 | 70 74 65 72 20 6d 6f 64 |s in.cha|pter mod|
|000035a0| 65 2e 0a 0a 46 6f 72 20 | 64 65 76 69 63 65 73 20 |e...For |devices |
|000035b0| 74 68 61 74 20 68 61 76 | 65 20 69 6e 64 69 63 65 |that hav|e indice|
|000035c0| 73 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 63 68 |s rather| than ch|
|000035d0| 61 70 74 65 72 73 2c 20 | 61 6e 64 20 6f 6e 6c 79 |apters, |and only|
|000035e0| 20 68 61 76 65 0a 72 65 | 6c 61 74 69 76 65 20 73 | have.re|lative s|
|000035f0| 65 61 72 63 68 20 6f 66 | 20 69 6e 64 69 63 65 73 |earch of| indices|
|00003600| 2c 20 7b 5c 74 74 20 65 | 6e 64 41 64 64 72 65 73 |, {\tt e|ndAddres|
|00003610| 73 7d 20 69 73 20 75 73 | 65 64 20 74 6f 20 69 6e |s} is us|ed to in|
|00003620| 64 69 63 61 74 65 0a 64 | 69 72 65 63 74 69 6f 6e |dicate.d|irection|
|00003630| 2e 20 41 73 20 75 73 75 | 61 6c 2c 20 30 20 69 73 |. As usu|al, 0 is|
|00003640| 20 46 6f 72 77 61 72 64 | 2c 20 31 20 69 73 20 52 | Forward|, 1 is R|
|00003650| 65 76 65 72 73 65 2e 0a | 0a 54 68 69 73 20 66 75 |everse..|.This fu|
|00003660| 6e 63 74 69 6f 6e 20 69 | 73 20 75 73 65 64 20 69 |nction i|s used i|
|00003670| 6e 20 34 20 64 69 66 66 | 65 72 65 6e 74 20 77 61 |n 4 diff|erent wa|
|00003680| 79 73 3a 0a 0a 5c 62 65 | 67 69 6e 7b 65 6e 75 6d |ys:..\be|gin{enum|
|00003690| 65 72 61 74 65 7d 0a 0a | 5c 69 74 65 6d 7b 5c 74 |erate}..|\item{\t|
|000036a0| 74 20 73 74 61 72 74 41 | 64 64 72 65 73 73 20 3d |t startA|ddress =|
|000036b0| 3d 20 65 6e 64 41 64 64 | 72 65 73 73 7d 5c 5c 0a |= endAdd|ress}\\.|
|000036c0| 53 65 61 72 63 68 65 73 | 20 74 6f 20 7b 5c 74 74 |Searches| to {\tt|
|000036d0| 20 73 74 61 72 74 41 64 | 64 72 65 73 73 7d 20 61 | startAd|dress} a|
|000036e0| 6e 64 20 73 74 69 6c 6c | 73 2e 20 20 54 68 69 73 |nd still|s. This|
|000036f0| 20 69 73 20 61 20 72 65 | 71 75 65 73 74 20 66 6f | is a re|quest fo|
|00003700| 72 20 61 0a 6e 6f 6e 2d | 62 6c 6f 63 6b 69 6e 67 |r a.non-|blocking|
|00003710| 20 73 65 61 72 63 68 3b | 20 69 6e 20 6f 74 68 65 | search;| in othe|
|00003720| 72 20 77 6f 72 64 73 2c | 20 7b 5c 74 74 20 44 65 |r words,| {\tt De|
|00003730| 76 50 6c 61 79 46 72 6f | 6d 54 6f 7d 20 77 69 6c |vPlayFro|mTo} wil|
|00003740| 6c 20 73 65 6e 64 20 74 | 68 65 0a 73 65 61 72 63 |l send t|he.searc|
|00003750| 68 20 63 6f 6d 6d 61 6e | 64 20 74 6f 20 74 68 65 |h comman|d to the|
|00003760| 20 73 70 65 63 69 66 69 | 63 20 64 65 76 69 63 65 | specifi|c device|
|00003770| 20 74 68 65 6e 20 77 69 | 6c 6c 20 72 65 74 75 72 | then wi|ll retur|
|00003780| 6e 20 61 73 20 73 6f 6f | 6e 20 61 73 0a 70 6f 73 |n as soo|n as.pos|
|00003790| 73 69 62 6c 65 20 28 66 | 6f 72 20 73 6f 6d 65 20 |sible (f|or some |
|000037a0| 70 6c 61 79 65 72 73 2c | 20 69 74 20 69 73 20 70 |players,| it is p|
|000037b0| 6f 73 73 69 62 6c 65 20 | 74 6f 20 72 65 61 64 20 |ossible |to read |
|000037c0| 61 6e 20 61 63 6b 6e 6f | 77 6c 65 64 67 65 0a 6d |an ackno|wledge.m|
|000037d0| 65 73 73 61 67 65 20 69 | 6e 64 69 63 61 74 69 6e |essage i|ndicatin|
|000037e0| 67 20 74 68 61 74 20 74 | 68 65 20 63 6f 6d 6d 61 |g that t|he comma|
|000037f0| 6e 64 20 68 61 73 20 62 | 65 67 75 6e 20 65 78 65 |nd has b|egun exe|
|00003800| 63 75 74 69 6f 6e 2c 20 | 74 68 65 6e 20 61 0a 63 |cution, |then a.c|
|00003810| 6f 6d 70 6c 65 74 69 6f | 6e 20 6d 65 73 73 61 67 |ompletio|n messag|
|00003820| 65 20 69 6e 64 69 63 61 | 74 69 6e 67 20 74 68 61 |e indica|ting tha|
|00003830| 74 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 68 61 |t the co|mmand ha|
|00003840| 73 20 63 6f 6d 70 6c 65 | 74 65 64 0a 65 78 65 63 |s comple|ted.exec|
|00003850| 75 74 69 6f 6e 2e 20 20 | 54 68 65 20 56 49 53 43 |ution. |The VISC|
|00003860| 41 20 70 72 6f 74 6f 63 | 6f 6c 20 66 6f 6c 6c 6f |A protoc|ol follo|
|00003870| 77 73 20 74 68 69 73 20 | 74 79 70 65 20 6f 66 20 |ws this |type of |
|00003880| 63 6f 6d 6d 75 6e 69 63 | 61 74 69 6f 6e 73 29 2e |communic|ations).|
|00003890| 0a 0a 5c 69 74 65 6d 7b | 5c 74 74 20 73 74 61 72 |..\item{|\tt star|
|000038a0| 74 41 64 64 72 65 73 73 | 20 21 3d 20 4e 55 4c 4c |tAddress| != NULL|
|000038b0| 2c 20 65 6e 64 41 64 64 | 72 65 73 73 20 3d 3d 20 |, endAdd|ress == |
|000038c0| 4e 55 4c 4c 7d 5c 5c 0a | 53 65 61 72 63 68 65 73 |NULL}\\.|Searches|
|000038d0| 20 74 6f 20 7b 5c 74 74 | 20 73 74 61 72 74 41 64 | to {\tt| startAd|
|000038e0| 64 72 65 73 73 7d 20 61 | 6e 64 20 73 74 69 6c 6c |dress} a|nd still|
|000038f0| 73 2e 20 20 54 68 69 73 | 20 69 73 20 61 20 72 65 |s. This| is a re|
|00003900| 71 75 65 73 74 20 66 6f | 72 20 61 0a 62 6c 6f 63 |quest fo|r a.bloc|
|00003910| 6b 69 6e 67 20 73 65 61 | 72 63 68 3b 20 69 6e 20 |king sea|rch; in |
|00003920| 6f 74 68 65 72 20 77 6f | 72 64 73 2c 20 74 68 65 |other wo|rds, the|
|00003930| 20 7b 5c 74 74 20 44 65 | 76 50 6c 61 79 46 72 6f | {\tt De|vPlayFro|
|00003940| 6d 54 6f 7d 20 66 75 6e | 63 74 69 6f 6e 20 77 69 |mTo} fun|ction wi|
|00003950| 6c 6c 0a 77 61 69 74 20 | 75 6e 74 69 6c 20 74 68 |ll.wait |until th|
|00003960| 65 20 64 65 76 69 63 65 | 20 63 6f 6d 70 6c 65 74 |e device| complet|
|00003970| 65 73 20 69 74 73 20 73 | 65 61 72 63 68 20 62 65 |es its s|earch be|
|00003980| 66 6f 72 65 20 72 65 74 | 75 72 6e 69 6e 67 20 74 |fore ret|urning t|
|00003990| 6f 20 74 68 65 0a 63 61 | 6c 6c 69 6e 67 20 61 70 |o the.ca|lling ap|
|000039a0| 70 6c 69 63 61 74 69 6f | 6e 2e 0a 0a 5c 69 74 65 |plicatio|n...\ite|
|000039b0| 6d 7b 5c 74 74 20 73 74 | 61 72 74 41 64 64 72 65 |m{\tt st|artAddre|
|000039c0| 73 73 20 3d 3d 20 4e 55 | 4c 4c 2c 20 65 6e 64 41 |ss == NU|LL, endA|
|000039d0| 64 64 72 65 73 73 20 21 | 3d 20 4e 55 4c 4c 7d 5c |ddress !|= NULL}\|
|000039e0| 5c 0a 50 6c 61 79 20 66 | 72 6f 6d 20 63 75 72 72 |\.Play f|rom curr|
|000039f0| 65 6e 74 20 70 6f 73 69 | 74 69 6f 6e 20 28 6e 6f |ent posi|tion (no|
|00003a00| 20 73 65 61 72 63 68 29 | 20 75 6e 74 69 6c 20 7b | search)| until {|
|00003a10| 5c 74 74 20 65 6e 64 41 | 64 64 72 65 73 73 7d 20 |\tt endA|ddress} |
|00003a20| 61 74 20 7b 5c 74 74 0a | 73 70 65 65 64 49 6e 46 |at {\tt.|speedInF|
|00003a30| 72 61 6d 65 73 50 65 72 | 53 65 63 6f 6e 64 7d 2e |ramesPer|Second}.|
|00003a40| 0a 0a 5c 69 74 65 6d 7b | 5c 74 74 20 73 74 61 72 |..\item{|\tt star|
|00003a50| 74 41 64 64 72 65 73 73 | 20 21 3d 20 65 6e 64 41 |tAddress| != endA|
|00003a60| 64 64 72 65 73 73 2c 20 | 20 73 74 61 72 74 41 64 |ddress, | startAd|
|00003a70| 64 72 65 73 73 20 21 3d | 20 4e 55 4c 4c 2c 20 65 |dress !=| NULL, e|
|00003a80| 6e 64 41 64 64 72 65 73 | 73 20 21 3d 20 4e 55 4c |ndAddres|s != NUL|
|00003a90| 4c 7d 5c 5c 0a 50 6c 61 | 79 20 66 72 6f 6d 20 7b |L}\\.Pla|y from {|
|00003aa0| 5c 74 74 20 73 74 61 72 | 74 41 64 64 72 65 73 73 |\tt star|tAddress|
|00003ab0| 7d 20 74 6f 20 7b 5c 74 | 74 20 65 6e 64 41 64 64 |} to {\t|t endAdd|
|00003ac0| 72 65 73 73 7d 20 61 74 | 20 7b 5c 74 74 0a 73 70 |ress} at| {\tt.sp|
|00003ad0| 65 65 64 49 6e 46 72 61 | 6d 65 73 50 65 72 53 65 |eedInFra|mesPerSe|
|00003ae0| 63 6f 6e 64 7d 2e 20 20 | 48 6f 77 65 76 65 72 2c |cond}. |However,|
|00003af0| 20 69 66 20 7b 5c 74 74 | 20 73 74 61 72 74 41 64 | if {\tt| startAd|
|00003b00| 64 72 65 73 73 7d 20 69 | 73 20 67 72 65 61 74 65 |dress} i|s greate|
|00003b10| 72 20 74 68 61 6e 0a 7b | 5c 74 74 20 65 6e 64 41 |r than.{|\tt endA|
|00003b20| 64 64 72 65 73 73 7d 2c | 20 74 68 65 6e 20 74 68 |ddress},| then th|
|00003b30| 65 20 66 75 6e 63 74 69 | 6f 6e 20 73 68 6f 75 6c |e functi|on shoul|
|00003b40| 64 20 72 65 74 75 72 6e | 20 61 6e 20 65 72 72 6f |d return| an erro|
|00003b50| 72 2e 0a 0a 5c 65 6e 64 | 7b 65 6e 75 6d 65 72 61 |r...\end|{enumera|
|00003b60| 74 65 7d 0a 0a 5c 69 74 | 65 6d 7b 5c 74 74 20 69 |te}..\it|em{\tt i|
|00003b70| 6e 74 20 28 2a 44 65 76 | 46 61 73 74 46 6f 72 77 |nt (*Dev|FastForw|
|00003b80| 61 72 64 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |ardPtr) |(VideoOb|
|00003b90| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 29 |ject* th|eObject)|
|00003ba0| 7d 0a 50 6f 69 6e 74 65 | 72 20 74 6f 20 66 75 6e |}.Pointe|r to fun|
|00003bb0| 63 74 69 6f 6e 20 74 68 | 61 74 20 70 6c 61 79 73 |ction th|at plays|
|00003bc0| 20 66 6f 72 77 61 72 64 | 20 61 74 20 68 69 67 68 | forward| at high|
|00003bd0| 65 72 20 74 68 61 6e 20 | 6e 6f 72 6d 61 6c 0a 28 |er than |normal.(|
|00003be0| 64 65 76 69 63 65 2d 64 | 65 70 65 6e 64 65 6e 74 |device-d|ependent|
|00003bf0| 29 20 73 70 65 65 64 2e | 0a 0a 49 74 20 6d 61 79 |) speed.|..It may|
|00003c00| 20 63 6f 6e 74 69 6e 75 | 65 20 74 6f 20 70 6c 61 | continu|e to pla|
|00003c10| 79 20 61 74 20 74 68 69 | 73 20 73 70 65 65 64 20 |y at thi|s speed |
|00003c20| 75 6e 74 69 6c 20 73 6f | 6d 65 20 6f 74 68 65 72 |until so|me other|
|00003c30| 20 63 6f 6d 6d 61 6e 64 | 20 69 73 20 69 73 73 75 | command| is issu|
|00003c40| 65 64 0a 28 74 68 65 20 | 75 73 75 61 6c 20 63 61 |ed.(the |usual ca|
|00003c50| 73 65 20 66 6f 72 20 56 | 43 52 73 29 2c 20 6f 72 |se for V|CRs), or|
|00003c60| 20 69 74 20 6d 61 79 20 | 72 65 74 75 72 6e 20 74 | it may |return t|
|00003c70| 6f 20 6e 6f 72 6d 61 6c | 20 70 6c 61 79 62 61 63 |o normal| playbac|
|00003c80| 6b 20 61 66 74 65 72 0a | 73 63 61 6e 6e 69 6e 67 |k after.|scanning|
|00003c90| 20 61 20 63 65 72 74 61 | 69 6e 20 6e 75 6d 62 65 | a certa|in numbe|
|00003ca0| 72 20 6f 66 20 66 72 61 | 6d 65 73 20 28 75 73 75 |r of fra|mes (usu|
|00003cb0| 61 6c 6c 79 20 74 68 65 | 20 63 61 73 65 20 66 6f |ally the| case fo|
|00003cc0| 72 20 76 69 64 65 6f 64 | 69 73 63 0a 70 6c 61 79 |r videod|isc.play|
|00003cd0| 65 72 73 29 2e 0a 20 20 | 20 0a 5c 69 74 65 6d 7b |ers).. | .\item{|
|00003ce0| 5c 74 74 20 69 6e 74 20 | 28 2a 44 65 76 52 65 76 |\tt int |(*DevRev|
|00003cf0| 65 72 73 65 50 74 72 29 | 20 28 56 69 64 65 6f 4f |ersePtr)| (VideoO|
|00003d00| 62 6a 65 63 74 2a 20 74 | 68 65 4f 62 6a 65 63 74 |bject* t|heObject|
|00003d10| 29 7d 0a 50 6f 69 6e 74 | 65 72 20 74 6f 20 66 75 |)}.Point|er to fu|
|00003d20| 6e 63 74 69 6f 6e 20 74 | 68 61 74 20 70 6c 61 79 |nction t|hat play|
|00003d30| 73 20 72 65 76 65 72 73 | 65 20 61 74 20 68 69 67 |s revers|e at hig|
|00003d40| 68 65 72 20 74 68 61 6e | 20 6e 6f 72 6d 61 6c 0a |her than| normal.|
|00003d50| 28 64 65 76 69 63 65 2d | 64 65 70 65 6e 64 65 6e |(device-|dependen|
|00003d60| 74 29 20 73 70 65 65 64 | 2e 0a 0a 49 74 20 6d 61 |t) speed|...It ma|
|00003d70| 79 20 63 6f 6e 74 69 6e | 75 65 20 74 6f 20 70 6c |y contin|ue to pl|
|00003d80| 61 79 20 61 74 20 74 68 | 69 73 20 73 70 65 65 64 |ay at th|is speed|
|00003d90| 20 75 6e 74 69 6c 20 73 | 6f 6d 65 20 6f 74 68 65 | until s|ome othe|
|00003da0| 72 20 63 6f 6d 6d 61 6e | 64 20 69 73 20 69 73 73 |r comman|d is iss|
|00003db0| 75 65 64 0a 28 74 68 65 | 20 75 73 75 61 6c 20 63 |ued.(the| usual c|
|00003dc0| 61 73 65 20 66 6f 72 20 | 56 43 52 73 29 2c 20 6f |ase for |VCRs), o|
|00003dd0| 72 20 69 74 20 6d 61 79 | 20 72 65 74 75 72 6e 20 |r it may| return |
|00003de0| 74 6f 20 6e 6f 72 6d 61 | 6c 20 70 6c 61 79 62 61 |to norma|l playba|
|00003df0| 63 6b 20 61 66 74 65 72 | 0a 73 63 61 6e 6e 69 6e |ck after|.scannin|
|00003e00| 67 20 61 20 63 65 72 74 | 61 69 6e 20 6e 75 6d 62 |g a cert|ain numb|
|00003e10| 65 72 20 6f 66 20 66 72 | 61 6d 65 73 20 28 75 73 |er of fr|ames (us|
|00003e20| 75 61 6c 6c 79 20 74 68 | 65 20 63 61 73 65 20 66 |ually th|e case f|
|00003e30| 6f 72 20 76 69 64 65 6f | 64 69 73 63 0a 70 6c 61 |or video|disc.pla|
|00003e40| 79 65 72 73 29 2e 0a 0a | 5c 69 74 65 6d 7b 5c 74 |yers)...|\item{\t|
|00003e50| 74 20 69 6e 74 20 28 2a | 44 65 76 43 61 6c 63 53 |t int (*|DevCalcS|
|00003e60| 70 65 65 64 50 74 72 29 | 20 28 56 69 64 65 6f 4f |peedPtr)| (VideoO|
|00003e70| 62 6a 65 63 74 2a 20 74 | 68 65 4f 62 6a 65 63 74 |bject* t|heObject|
|00003e80| 2c 20 69 6e 74 20 69 6e | 70 75 74 56 61 6c 75 65 |, int in|putValue|
|00003e90| 2c 5c 5c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |,\\. | |
|00003ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003eb0| 20 20 20 20 69 6e 74 20 | 70 6c 61 79 4d 6f 64 65 | int |playMode|
|00003ec0| 29 7d 0a 50 6f 69 6e 74 | 65 72 20 74 6f 20 66 75 |)}.Point|er to fu|
|00003ed0| 6e 63 74 69 6f 6e 20 74 | 68 61 74 20 72 65 74 75 |nction t|hat retu|
|00003ee0| 72 6e 73 20 73 70 65 65 | 64 20 28 69 6e 20 6e 75 |rns spee|d (in nu|
|00003ef0| 6d 62 65 72 20 6f 66 20 | 66 72 61 6d 65 73 20 70 |mber of |frames p|
|00003f00| 65 72 20 73 65 63 6f 6e | 64 29 0a 74 68 61 74 20 |er secon|d).that |
|00003f10| 63 61 6e 20 62 65 20 70 | 6c 61 79 65 64 20 62 79 |can be p|layed by|
|00003f20| 20 7b 5c 74 74 20 74 68 | 65 4f 62 6a 65 63 74 7d | {\tt th|eObject}|
|00003f30| 2e 0a 0a 7b 5c 74 74 20 | 69 6e 70 75 74 56 61 6c |...{\tt |inputVal|
|00003f40| 75 65 7d 20 69 73 20 74 | 68 65 20 61 63 74 75 61 |ue} is t|he actua|
|00003f50| 6c 20 73 70 65 65 64 20 | 69 6e 20 66 72 61 6d 65 |l speed |in frame|
|00003f60| 73 20 70 65 72 20 73 65 | 63 6f 6e 64 20 61 74 20 |s per se|cond at |
|00003f70| 77 68 69 63 68 20 74 68 | 65 0a 75 73 65 72 20 77 |which th|e.user w|
|00003f80| 6f 75 6c 64 20 6c 69 6b | 65 20 74 6f 20 70 6c 61 |ould lik|e to pla|
|00003f90| 79 2e 20 20 7b 5c 74 74 | 20 70 6c 61 79 4d 6f 64 |y. {\tt| playMod|
|00003fa0| 65 7d 20 69 73 20 30 20 | 66 6f 72 20 6e 6f 72 6d |e} is 0 |for norm|
|00003fb0| 61 6c 20 70 6c 61 79 62 | 61 63 6b 20 61 6e 64 20 |al playb|ack and |
|00003fc0| 31 0a 66 6f 72 20 73 65 | 67 6d 65 6e 74 20 70 6c |1.for se|gment pl|
|00003fd0| 61 79 20 28 69 65 20 70 | 6c 61 79 62 61 63 6b 20 |ay (ie p|layback |
|00003fe0| 66 72 6f 6d 20 6f 6e 65 | 20 61 64 64 72 65 73 73 |from one| address|
|00003ff0| 20 74 6f 20 61 6e 6f 74 | 68 65 72 29 2c 20 73 69 | to anot|her), si|
|00004000| 6e 63 65 20 69 74 20 69 | 73 0a 66 6f 75 6e 64 20 |nce it i|s.found |
|00004010| 69 6e 20 73 6f 6d 65 20 | 63 61 73 65 73 20 74 68 |in some |cases th|
|00004020| 61 74 20 64 65 76 69 63 | 65 73 20 61 72 65 20 61 |at devic|es are a|
|00004030| 62 6c 65 20 74 6f 20 70 | 6c 61 79 20 61 74 20 73 |ble to p|lay at s|
|00004040| 70 65 63 69 61 6c 20 73 | 70 65 65 64 73 20 6f 6e |pecial s|peeds on|
|00004050| 6c 79 0a 69 6e 20 6e 6f | 72 6d 61 6c 20 70 6c 61 |ly.in no|rmal pla|
|00004060| 79 62 61 63 6b 20 6d 6f | 64 65 2e 0a 0a 5c 69 74 |yback mo|de...\it|
|00004070| 65 6d 7b 5c 74 74 20 69 | 6e 74 20 28 2a 44 65 76 |em{\tt i|nt (*Dev|
|00004080| 50 6c 61 79 41 74 53 70 | 65 65 64 44 69 72 50 74 |PlayAtSp|eedDirPt|
|00004090| 72 29 20 28 56 69 64 65 | 6f 4f 62 6a 65 63 74 2a |r) (Vide|oObject*|
|000040a0| 20 74 68 65 4f 62 6a 65 | 63 74 2c 5c 5c 0a 20 20 | theObje|ct,\\. |
|000040b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|000040d0| 6e 74 20 73 70 65 65 64 | 49 6e 46 72 61 6d 65 73 |nt speed|InFrames|
|000040e0| 50 65 72 53 65 63 6f 6e | 64 2c 5c 5c 0a 20 20 20 |PerSecon|d,\\. |
|000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6e | | en|
|00004110| 75 6d 20 44 69 72 65 63 | 74 69 6f 6e 20 64 69 72 |um Direc|tion dir|
|00004120| 65 63 74 69 6f 6e 29 7d | 0a 0a 50 6f 69 6e 74 65 |ection)}|..Pointe|
|00004130| 72 20 74 6f 20 66 75 6e | 63 74 69 6f 6e 20 74 68 |r to fun|ction th|
|00004140| 61 74 20 70 6c 61 79 73 | 20 61 74 20 7b 5c 74 74 |at plays| at {\tt|
|00004150| 20 73 70 65 65 64 49 6e | 46 72 61 6d 65 73 50 65 | speedIn|FramesPe|
|00004160| 72 53 65 63 6f 6e 64 7d | 20 69 6e 20 7b 5c 74 74 |rSecond}| in {\tt|
|00004170| 0a 64 69 72 65 63 74 69 | 6f 6e 7d 2c 20 77 68 65 |.directi|on}, whe|
|00004180| 72 65 20 7b 5c 74 74 20 | 64 69 72 65 63 74 69 6f |re {\tt |directio|
|00004190| 6e 7d 20 63 61 6e 20 62 | 65 20 7b 5c 74 74 20 46 |n} can b|e {\tt F|
|000041a0| 6f 72 77 61 72 64 7d 20 | 6f 72 20 7b 5c 74 74 20 |orward} |or {\tt |
|000041b0| 52 65 76 65 72 73 65 7d | 2e 0a 0a 54 68 69 73 20 |Reverse}|...This |
|000041c0| 66 75 6e 63 74 69 6f 6e | 20 73 68 6f 75 6c 64 20 |function| should |
|000041d0| 63 61 6c 6c 20 7b 5c 74 | 74 20 44 65 76 43 61 6c |call {\t|t DevCal|
|000041e0| 63 53 70 65 65 64 28 29 | 7d 20 73 6f 20 61 73 20 |cSpeed()|} so as |
|000041f0| 74 6f 20 6f 62 74 61 69 | 6e 20 74 68 65 0a 64 65 |to obtai|n the.de|
|00004200| 76 69 63 65 2d 73 70 65 | 63 69 66 69 63 20 73 70 |vice-spe|cific sp|
|00004210| 65 65 64 20 62 61 73 65 | 64 20 6f 6e 20 7b 5c 74 |eed base|d on {\t|
|00004220| 74 20 73 70 65 65 64 49 | 6e 46 72 61 6d 65 73 50 |t speedI|nFramesP|
|00004230| 65 72 53 65 63 6f 6e 64 | 7d 2e 0a 0a 5c 69 74 65 |erSecond|}...\ite|
|00004240| 6d 7b 5c 74 74 20 69 6e | 74 20 28 2a 44 65 76 53 |m{\tt in|t (*DevS|
|00004250| 74 65 70 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |tepPtr) |(VideoOb|
|00004260| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 2c |ject* th|eObject,|
|00004270| 20 65 6e 75 6d 20 44 69 | 72 65 63 74 69 6f 6e 0a | enum Di|rection.|
|00004280| 64 69 72 65 63 74 69 6f | 6e 29 7d 0a 0a 50 6f 69 |directio|n)}..Poi|
|00004290| 6e 74 65 72 20 74 6f 20 | 66 75 6e 63 74 69 6f 6e |nter to |function|
|000042a0| 20 74 68 61 74 20 73 74 | 65 70 73 20 6f 6e 65 20 | that st|eps one |
|000042b0| 66 72 61 6d 65 20 69 6e | 20 7b 5c 74 74 20 64 69 |frame in| {\tt di|
|000042c0| 72 65 63 74 69 6f 6e 7d | 2e 0a 0a 5c 69 74 65 6d |rection}|...\item|
|000042d0| 7b 5c 74 74 20 69 6e 74 | 20 28 2a 44 65 76 53 74 |{\tt int| (*DevSt|
|000042e0| 69 6c 6c 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |illPtr) |(VideoOb|
|000042f0| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 29 |ject* th|eObject)|
|00004300| 7d 0a 0a 50 6f 69 6e 74 | 65 72 20 74 6f 20 66 75 |}..Point|er to fu|
|00004310| 6e 63 74 69 6f 6e 20 74 | 68 61 74 20 70 75 74 73 |nction t|hat puts|
|00004320| 20 7b 5c 74 74 20 74 68 | 65 4f 62 6a 65 63 74 7d | {\tt th|eObject}|
|00004330| 20 69 6e 74 6f 20 7b 5c | 74 74 20 73 74 69 6c 6c | into {\|tt still|
|00004340| 7d 20 6d 6f 64 65 2c 0a | 6d 65 61 6e 69 6e 67 20 |} mode,.|meaning |
|00004350| 74 68 65 20 66 72 61 6d | 65 20 69 73 20 66 72 6f |the fram|e is fro|
|00004360| 7a 65 6e 2c 20 62 75 74 | 20 76 69 64 65 6f 20 69 |zen, but| video i|
|00004370| 73 20 6e 6f 74 20 6d 75 | 74 65 64 2e 0a 0a 54 68 |s not mu|ted...Th|
|00004380| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 73 68 6f 75 |is funct|ion shou|
|00004390| 6c 64 20 62 65 20 61 62 | 6c 65 20 74 6f 20 65 78 |ld be ab|le to ex|
|000043a0| 65 63 75 74 65 20 69 6e | 20 61 6e 79 20 6d 6f 64 |ecute in| any mod|
|000043b0| 65 2c 20 77 68 69 63 68 | 20 6d 65 61 6e 73 20 74 |e, which| means t|
|000043c0| 68 61 74 20 69 66 0a 73 | 65 67 6d 65 6e 74 20 70 |hat if.s|egment p|
|000043d0| 6c 61 79 20 28 69 65 20 | 70 6c 61 79 62 61 63 6b |lay (ie |playback|
|000043e0| 20 66 72 6f 6d 20 6f 6e | 65 20 61 64 64 72 65 73 | from on|e addres|
|000043f0| 73 20 74 6f 20 61 6e 6f | 74 68 65 72 29 20 69 73 |s to ano|ther) is|
|00004400| 20 6e 6f 74 0a 69 6e 74 | 65 72 72 75 70 74 69 62 | not.int|erruptib|
|00004410| 6c 65 20 62 79 20 61 20 | 6e 6f 72 6d 61 6c 20 70 |le by a |normal p|
|00004420| 61 75 73 65 20 63 6f 6d | 6d 61 6e 64 2c 20 61 6e |ause com|mand, an|
|00004430| 20 69 6e 74 65 72 72 75 | 70 74 20 63 6f 6d 6d 61 | interru|pt comma|
|00004440| 6e 64 20 73 68 6f 75 6c | 64 20 62 65 0a 75 73 65 |nd shoul|d be.use|
|00004450| 64 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 70 |d to imp|lement p|
|00004460| 61 75 73 65 2e 0a 0a 20 | 20 20 41 6e 20 65 78 61 |ause... | An exa|
|00004470| 6d 70 6c 65 20 6f 66 20 | 61 20 64 65 76 69 63 65 |mple of |a device|
|00004480| 20 74 68 61 74 20 63 61 | 6e 6e 6f 74 20 70 61 75 | that ca|nnot pau|
|00004490| 73 65 20 73 65 67 6d 65 | 6e 74 20 70 6c 61 79 20 |se segme|nt play |
|000044a0| 69 73 20 74 68 65 20 4e | 45 43 0a 50 43 2d 56 43 |is the N|EC.PC-VC|
|000044b0| 52 2e 20 20 49 6e 20 6f | 72 64 65 72 20 74 6f 20 |R. In o|rder to |
|000044c0| 69 6d 70 6c 65 6d 65 6e | 74 20 61 20 70 61 75 73 |implemen|t a paus|
|000044d0| 65 20 69 6e 20 74 68 69 | 73 20 6d 6f 64 65 2c 20 |e in thi|s mode, |
|000044e0| 74 68 65 20 64 72 69 76 | 65 72 20 73 65 6e 64 73 |the driv|er sends|
|000044f0| 0a 6f 75 74 20 61 6e 20 | 69 6e 74 65 72 72 75 70 |.out an |interrup|
|00004500| 74 20 63 6f 6d 6d 61 6e | 64 20 62 65 66 6f 72 65 |t comman|d before|
|00004510| 20 69 74 20 73 65 6e 64 | 73 20 6f 75 74 20 69 74 | it send|s out it|
|00004520| 73 20 70 61 75 73 65 20 | 63 6f 6d 6d 61 6e 64 2e |s pause |command.|
|00004530| 0a 0a 5c 69 74 65 6d 7b | 5c 74 74 20 69 6e 74 20 |..\item{|\tt int |
|00004540| 28 2a 44 65 76 53 74 6f | 70 50 74 72 29 20 28 56 |(*DevSto|pPtr) (V|
|00004550| 69 64 65 6f 4f 62 6a 65 | 63 74 2a 20 74 68 65 4f |ideoObje|ct* theO|
|00004560| 62 6a 65 63 74 29 7d 0a | 0a 50 6f 69 6e 74 65 72 |bject)}.|.Pointer|
|00004570| 20 74 6f 20 66 75 6e 63 | 74 69 6f 6e 20 74 68 61 | to func|tion tha|
|00004580| 74 20 70 75 74 73 20 7b | 5c 74 74 20 74 68 65 4f |t puts {|\tt theO|
|00004590| 62 6a 65 63 74 7d 20 69 | 6e 74 6f 20 7b 5c 74 74 |bject} i|nto {\tt|
|000045a0| 20 73 74 6f 70 7d 20 6d | 6f 64 65 2c 20 6d 65 61 | stop} m|ode, mea|
|000045b0| 6e 69 6e 67 20 74 68 61 | 74 0a 70 6c 61 79 62 61 |ning tha|t.playba|
|000045c0| 63 6b 20 69 73 20 73 74 | 6f 70 70 65 64 20 61 6e |ck is st|opped an|
|000045d0| 64 20 76 69 64 65 6f 20 | 69 73 20 6d 75 74 65 64 |d video |is muted|
|000045e0| 2e 0a 0a 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |...This |function|
|000045f0| 20 64 6f 65 73 20 4e 4f | 54 20 73 68 75 74 20 64 | does NO|T shut d|
|00004600| 6f 77 6e 20 74 68 65 20 | 64 69 73 63 20 6d 6f 74 |own the |disc mot|
|00004610| 6f 72 2e 20 54 68 69 73 | 20 66 75 6e 63 74 69 6f |or. This| functio|
|00004620| 6e 20 73 68 6f 75 6c 64 | 20 62 65 0a 61 62 6c 65 |n should| be.able|
|00004630| 20 74 6f 20 65 78 65 63 | 75 74 65 20 69 6e 20 61 | to exec|ute in a|
|00004640| 6e 79 20 6d 6f 64 65 2c | 20 77 68 69 63 68 20 6d |ny mode,| which m|
|00004650| 65 61 6e 73 20 74 68 61 | 74 20 69 66 20 73 65 67 |eans tha|t if seg|
|00004660| 6d 65 6e 74 20 70 6c 61 | 79 20 69 73 20 6e 6f 74 |ment pla|y is not|
|00004670| 0a 69 6e 74 65 72 72 75 | 70 74 69 62 6c 65 20 62 |.interru|ptible b|
|00004680| 79 20 61 20 6e 6f 72 6d | 61 6c 20 73 74 6f 70 20 |y a norm|al stop |
|00004690| 63 6f 6d 6d 61 6e 64 2c | 20 61 6e 20 69 6e 74 65 |command,| an inte|
|000046a0| 72 72 75 70 74 20 63 6f | 6d 6d 61 6e 64 20 73 68 |rrupt co|mmand sh|
|000046b0| 6f 75 6c 64 20 62 65 0a | 75 73 65 64 20 74 6f 20 |ould be.|used to |
|000046c0| 69 6d 70 6c 65 6d 65 6e | 74 20 73 74 6f 70 2e 20 |implemen|t stop. |
|000046d0| 53 65 65 20 73 69 6d 69 | 6c 61 72 20 63 6f 6d 6d |See simi|lar comm|
|000046e0| 65 6e 74 73 20 66 6f 72 | 20 7b 5c 74 74 20 44 65 |ents for| {\tt De|
|000046f0| 76 53 74 69 6c 6c 50 74 | 72 7d 2c 20 61 62 6f 76 |vStillPt|r}, abov|
|00004700| 65 2e 0a 0a 5c 69 74 65 | 6d 7b 5c 74 74 20 69 6e |e...\ite|m{\tt in|
|00004710| 74 20 28 2a 44 65 76 53 | 65 74 44 65 66 61 75 6c |t (*DevS|etDefaul|
|00004720| 74 73 50 74 72 29 20 28 | 56 69 64 65 6f 4f 62 6a |tsPtr) (|VideoObj|
|00004730| 65 63 74 2a 20 74 68 65 | 4f 62 6a 65 63 74 2c 20 |ect* the|Object, |
|00004740| 69 6e 74 20 61 75 64 69 | 6f 2c 5c 5c 0a 20 20 20 |int audi|o,\\. |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 6e 74 | | int|
|00004770| 20 61 64 64 72 65 73 73 | 69 6e 67 4d 6f 64 65 2c | address|ingMode,|
|00004780| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\\. | |
|00004790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047a0| 20 20 20 69 6e 74 20 61 | 64 64 72 65 73 73 44 69 | int a|ddressDi|
|000047b0| 73 70 6c 61 79 4f 6e 4f | 66 66 2c 20 69 6e 74 20 |splayOnO|ff, int |
|000047c0| 64 69 73 70 6c 61 79 4d | 6f 64 65 29 7d 0a 0a 50 |displayM|ode)}..P|
|000047d0| 6f 69 6e 74 65 72 20 74 | 6f 20 66 75 6e 63 74 69 |ointer t|o functi|
|000047e0| 6f 6e 20 74 68 61 74 20 | 70 75 74 73 20 7b 5c 74 |on that |puts {\t|
|000047f0| 74 20 74 68 65 4f 62 6a | 65 63 74 7d 20 69 6e 74 |t theObj|ect} int|
|00004800| 6f 20 64 65 73 69 72 65 | 64 20 6d 6f 64 65 20 77 |o desire|d mode w|
|00004810| 68 65 6e 0a 73 74 61 72 | 74 69 6e 67 20 69 74 20 |hen.star|ting it |
|00004820| 75 70 2e 0a 0a 5c 62 65 | 67 69 6e 7b 69 74 65 6d |up...\be|gin{item|
|00004830| 69 7a 65 7d 0a 0a 5c 69 | 74 65 6d 7b 5c 74 74 20 |ize}..\i|tem{\tt |
|00004840| 61 75 64 69 6f 7d 5c 5c | 0a 4f 6e 65 20 6f 66 20 |audio}\\|.One of |
|00004850| 7b 5c 74 74 20 4d 75 74 | 65 2c 20 4c 65 66 74 2c |{\tt Mut|e, Left,|
|00004860| 20 52 69 67 68 74 2c 20 | 53 74 65 72 65 6f 7d 2e | Right, |Stereo}.|
|00004870| 20 20 4f 74 68 65 72 73 | 20 63 61 6e 20 62 65 20 | Others| can be |
|00004880| 61 73 73 69 67 6e 65 64 | 20 62 79 20 74 68 65 0a |assigned| by the.|
|00004890| 70 72 6f 67 72 61 6d 6d | 65 72 20 66 6f 72 20 6f |programm|er for o|
|000048a0| 74 68 65 72 20 6d 6f 64 | 65 73 2c 20 62 75 74 20 |ther mod|es, but |
|000048b0| 74 68 69 73 20 6d 69 67 | 68 74 20 6e 6f 74 20 62 |this mig|ht not b|
|000048c0| 65 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 75 6e |e implem|ented un|
|000048d0| 69 66 6f 72 6d 6c 79 0a | 61 63 72 6f 73 73 20 61 |iformly.|across a|
|000048e0| 6c 6c 20 76 69 64 65 6f | 20 6f 62 6a 65 63 74 73 |ll video| objects|
|000048f0| 21 0a 0a 5c 69 74 65 6d | 7b 5c 74 74 20 61 64 64 |!..\item|{\tt add|
|00004900| 72 65 73 73 69 6e 67 4d | 6f 64 65 7d 5c 5c 0a 45 |ressingM|ode}\\.E|
|00004910| 69 74 68 65 72 20 7b 5c | 74 74 20 50 6c 61 79 65 |ither {\|tt Playe|
|00004920| 72 46 72 61 6d 65 4d 6f | 64 65 20 3d 20 4e 6f 72 |rFrameMo|de = Nor|
|00004930| 6d 61 6c 7d 20 28 75 73 | 75 61 6c 6c 79 20 6d 65 |mal} (us|ually me|
|00004940| 61 6e 73 20 66 72 61 6d | 65 20 61 64 64 72 65 73 |ans fram|e addres|
|00004950| 73 69 6e 67 29 0a 6f 72 | 20 7b 5c 74 74 20 50 6c |sing).or| {\tt Pl|
|00004960| 61 79 65 72 43 68 61 70 | 74 65 72 4d 6f 64 65 20 |ayerChap|terMode |
|00004970| 3d 20 49 6e 64 65 78 69 | 6e 67 7d 20 28 6f 72 20 |= Indexi|ng} (or |
|00004980| 43 68 61 70 74 65 72 73 | 29 2e 0a 0a 5c 69 74 65 |Chapters|)...\ite|
|00004990| 6d 7b 5c 74 74 20 61 64 | 64 72 65 73 73 44 69 73 |m{\tt ad|dressDis|
|000049a0| 70 6c 61 79 4f 6e 4f 66 | 66 7d 5c 5c 0a 45 69 74 |playOnOf|f}\\.Eit|
|000049b0| 68 65 72 20 7b 5c 74 74 | 20 46 65 61 74 75 72 65 |her {\tt| Feature|
|000049c0| 4f 66 66 7d 20 28 4e 6f | 20 61 64 64 72 65 73 73 |Off} (No| address|
|000049d0| 20 64 69 73 70 6c 61 79 | 20 6f 6e 20 73 63 72 65 | display| on scre|
|000049e0| 65 6e 29 20 6f 72 20 7b | 5c 74 74 0a 46 65 61 74 |en) or {|\tt.Feat|
|000049f0| 75 72 65 4f 6e 7d 20 28 | 41 64 64 72 65 73 73 20 |ureOn} (|Address |
|00004a00| 64 69 73 70 6c 61 79 20 | 6f 6e 20 73 63 72 65 65 |display |on scree|
|00004a10| 6e 29 2e 0a 0a 5c 69 74 | 65 6d 7b 5c 74 74 20 64 |n)...\it|em{\tt d|
|00004a20| 69 73 70 6c 61 79 4d 6f | 64 65 7d 5c 5c 0a 4f 6e |isplayMo|de}\\.On|
|00004a30| 65 20 6f 66 20 7b 5c 74 | 74 20 44 69 73 70 6c 61 |e of {\t|t Displa|
|00004a40| 79 46 72 61 6d 65 7d 20 | 28 44 69 73 70 6c 61 79 |yFrame} |(Display|
|00004a50| 20 66 72 61 6d 65 20 61 | 64 64 72 65 73 73 20 6f | frame a|ddress o|
|00004a60| 6e 20 73 63 72 65 65 6e | 29 2c 20 7b 5c 74 74 0a |n screen|), {\tt.|
|00004a70| 44 69 73 70 6c 61 79 43 | 68 61 70 74 65 72 7d 20 |DisplayC|hapter} |
|00004a80| 28 44 69 73 70 6c 61 79 | 20 63 68 61 70 74 65 72 |(Display| chapter|
|00004a90| 20 6f 6e 20 73 63 72 65 | 65 6e 29 2c 20 6f 72 20 | on scre|en), or |
|00004aa0| 7b 5c 74 74 0a 44 69 73 | 70 6c 61 79 46 72 61 6d |{\tt.Dis|playFram|
|00004ab0| 65 41 6e 64 43 68 61 70 | 74 65 72 7d 20 28 44 69 |eAndChap|ter} (Di|
|00004ac0| 73 70 6c 61 79 20 66 72 | 61 6d 65 20 61 6e 64 20 |splay fr|ame and |
|00004ad0| 63 68 61 70 74 65 72 20 | 6f 6e 20 73 63 72 65 65 |chapter |on scree|
|00004ae0| 6e 29 2e 0a 0a 5c 65 6e | 64 7b 69 74 65 6d 69 7a |n)...\en|d{itemiz|
|00004af0| 65 7d 0a 0a 54 68 65 20 | 7b 5c 74 74 20 5c 23 64 |e}..The |{\tt \#d|
|00004b00| 65 66 69 6e 65 27 73 7d | 20 66 6f 72 20 74 68 65 |efine's}| for the|
|00004b10| 73 65 20 70 61 72 61 6d | 65 74 65 72 73 20 61 72 |se param|eters ar|
|00004b20| 65 20 69 6e 20 7b 5c 74 | 74 20 50 6c 61 79 65 72 |e in {\t|t Player|
|00004b30| 53 74 61 74 75 73 2e 68 | 7d 2e 0a 0a 5c 69 74 65 |Status.h|}...\ite|
|00004b40| 6d 7b 5c 74 74 20 69 6e | 74 20 28 2a 44 65 76 53 |m{\tt in|t (*DevS|
|00004b50| 65 74 41 75 64 69 6f 50 | 74 72 29 20 28 56 69 64 |etAudioP|tr) (Vid|
|00004b60| 65 6f 4f 62 6a 65 63 74 | 2a 20 74 68 65 4f 62 6a |eoObject|* theObj|
|00004b70| 65 63 74 2c 20 69 6e 74 | 20 6d 6f 64 65 29 7d 0a |ect, int| mode)}.|
|00004b80| 0a 50 6f 69 6e 74 65 72 | 20 74 6f 20 66 75 6e 63 |.Pointer| to func|
|00004b90| 74 69 6f 6e 20 74 68 61 | 74 20 73 65 74 73 20 61 |tion tha|t sets a|
|00004ba0| 75 64 69 6f 20 74 6f 20 | 7b 5c 74 74 20 6d 6f 64 |udio to |{\tt mod|
|00004bb0| 65 7d 20 28 73 65 65 20 | 64 65 66 69 6e 69 74 69 |e} (see |definiti|
|00004bc0| 6f 6e 20 6f 66 0a 7b 5c | 74 74 20 44 65 76 53 65 |on of.{\|tt DevSe|
|00004bd0| 74 44 65 66 61 75 6c 74 | 73 50 74 72 7d 2c 20 61 |tDefault|sPtr}, a|
|00004be0| 62 6f 76 65 29 2e 0a 0a | 5c 69 74 65 6d 7b 5c 74 |bove)...|\item{\t|
|00004bf0| 74 20 69 6e 74 20 28 2a | 44 65 76 53 65 74 56 69 |t int (*|DevSetVi|
|00004c00| 64 65 6f 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |deoPtr) |(VideoOb|
|00004c10| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 2c |ject* th|eObject,|
|00004c20| 20 69 6e 74 20 6d 6f 64 | 65 29 7d 0a 0a 50 6f 69 | int mod|e)}..Poi|
|00004c30| 6e 74 65 72 20 74 6f 20 | 66 75 6e 63 74 69 6f 6e |nter to |function|
|00004c40| 20 74 68 61 74 20 73 65 | 74 73 20 76 69 64 65 6f | that se|ts video|
|00004c50| 20 74 6f 20 7b 5c 74 74 | 20 6d 6f 64 65 7d 2c 20 | to {\tt| mode}, |
|00004c60| 65 69 74 68 65 72 20 7b | 5c 74 74 0a 46 65 61 74 |either {|\tt.Feat|
|00004c70| 75 72 65 4f 6e 7d 20 6f | 72 20 7b 5c 74 74 20 46 |ureOn} o|r {\tt F|
|00004c80| 65 61 74 75 72 65 4f 66 | 66 7d 2e 0a 0a 5c 69 74 |eatureOf|f}...\it|
|00004c90| 65 6d 7b 5c 74 74 20 69 | 6e 74 20 28 2a 44 65 76 |em{\tt i|nt (*Dev|
|00004ca0| 53 65 74 41 64 64 4d 6f | 64 65 50 74 72 29 20 28 |SetAddMo|dePtr) (|
|00004cb0| 56 69 64 65 6f 4f 62 6a | 65 63 74 2a 20 74 68 65 |VideoObj|ect* the|
|00004cc0| 4f 62 6a 65 63 74 2c 20 | 69 6e 74 20 6d 6f 64 65 |Object, |int mode|
|00004cd0| 29 7d 0a 0a 50 6f 69 6e | 74 65 72 20 74 6f 20 66 |)}..Poin|ter to f|
|00004ce0| 75 6e 63 74 69 6f 6e 20 | 74 68 61 74 20 73 65 74 |unction |that set|
|00004cf0| 73 20 61 64 64 72 65 73 | 73 69 6e 67 20 6d 6f 64 |s addres|sing mod|
|00004d00| 65 20 74 6f 20 7b 5c 74 | 74 20 6d 6f 64 65 7d 20 |e to {\t|t mode} |
|00004d10| 28 73 65 65 0a 64 65 66 | 69 6e 69 74 69 6f 6e 20 |(see.def|inition |
|00004d20| 6f 66 20 7b 5c 74 74 20 | 44 65 76 53 65 74 44 65 |of {\tt |DevSetDe|
|00004d30| 66 61 75 6c 74 73 50 74 | 72 7d 2c 20 61 62 6f 76 |faultsPt|r}, abov|
|00004d40| 65 29 2e 0a 0a 5c 69 74 | 65 6d 7b 5c 74 74 20 69 |e)...\it|em{\tt i|
|00004d50| 6e 74 20 28 2a 44 65 76 | 53 65 74 41 64 64 72 65 |nt (*Dev|SetAddre|
|00004d60| 73 73 44 69 73 70 6c 61 | 79 50 74 72 29 20 28 56 |ssDispla|yPtr) (V|
|00004d70| 69 64 65 6f 4f 62 6a 65 | 63 74 2a 20 74 68 65 4f |ideoObje|ct* theO|
|00004d80| 62 6a 65 63 74 2c 20 69 | 6e 74 20 6f 6e 4f 66 66 |bject, i|nt onOff|
|00004d90| 2c 5c 5c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |,\\. | |
|00004da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 6e 74 20 | | int |
|00004dc0| 6d 6f 64 65 29 7d 0a 0a | 50 6f 69 6e 74 65 72 20 |mode)}..|Pointer |
|00004dd0| 74 6f 20 66 75 6e 63 74 | 69 6f 6e 20 74 68 61 74 |to funct|ion that|
|00004de0| 20 65 69 74 68 65 72 20 | 74 75 72 6e 73 20 6f 6e | either |turns on|
|00004df0| 2d 73 63 72 65 65 6e 20 | 61 64 64 72 65 73 73 20 |-screen |address |
|00004e00| 64 69 73 70 6c 61 79 20 | 74 6f 20 7b 5c 74 74 0a |display |to {\tt.|
|00004e10| 6f 6e 7d 20 6f 72 20 7b | 5c 74 74 20 6f 66 66 7d |on} or {|\tt off}|
|00004e20| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 76 61 | dependi|ng on va|
|00004e30| 6c 75 65 20 6f 66 20 7b | 5c 74 74 20 6f 6e 4f 66 |lue of {|\tt onOf|
|00004e40| 66 7d 20 61 6e 64 20 73 | 65 74 73 20 74 68 65 20 |f} and s|ets the |
|00004e50| 64 69 73 70 6c 61 79 0a | 74 6f 20 7b 5c 74 74 20 |display.|to {\tt |
|00004e60| 6d 6f 64 65 7d 20 28 73 | 65 65 20 64 65 66 69 6e |mode} (s|ee defin|
|00004e70| 69 74 69 6f 6e 20 6f 66 | 20 7b 5c 74 74 20 44 65 |ition of| {\tt De|
|00004e80| 76 53 65 74 44 65 66 61 | 75 6c 74 73 50 74 72 7d |vSetDefa|ultsPtr}|
|00004e90| 2c 20 61 62 6f 76 65 29 | 2e 0a 0a 5c 69 74 65 6d |, above)|...\item|
|00004ea0| 7b 5c 74 74 20 69 6e 74 | 20 28 2a 44 65 76 45 6a |{\tt int| (*DevEj|
|00004eb0| 65 63 74 50 74 72 29 20 | 28 56 69 64 65 6f 4f 62 |ectPtr) |(VideoOb|
|00004ec0| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 29 |ject* th|eObject)|
|00004ed0| 7d 0a 0a 50 6f 69 6e 74 | 65 72 20 74 6f 20 66 75 |}..Point|er to fu|
|00004ee0| 6e 63 74 69 6f 6e 20 74 | 68 61 74 20 65 6a 65 63 |nction t|hat ejec|
|00004ef0| 74 73 20 74 68 65 20 6d | 65 64 69 75 6d 20 66 72 |ts the m|edium fr|
|00004f00| 6f 6d 20 74 68 65 20 70 | 6c 61 79 65 72 2e 20 20 |om the p|layer. |
|00004f10| 52 65 74 75 72 6e 73 0a | 73 74 61 74 75 73 20 63 |Returns.|status c|
|00004f20| 6f 64 65 2e 0a 0a 5c 69 | 74 65 6d 7b 5c 74 74 20 |ode...\i|tem{\tt |
|00004f30| 69 6e 74 20 28 2a 44 65 | 76 50 6f 77 65 72 50 74 |int (*De|vPowerPt|
|00004f40| 72 29 20 28 56 69 64 65 | 6f 4f 62 6a 65 63 74 2a |r) (Vide|oObject*|
|00004f50| 20 74 68 65 4f 62 6a 65 | 63 74 2c 20 69 6e 74 20 | theObje|ct, int |
|00004f60| 6d 6f 64 65 29 7d 0a 0a | 50 6f 69 6e 74 65 72 20 |mode)}..|Pointer |
|00004f70| 74 6f 20 66 75 6e 63 74 | 69 6f 6e 20 74 68 61 74 |to funct|ion that|
|00004f80| 20 74 75 72 6e 73 20 70 | 6f 77 65 72 20 65 69 74 | turns p|ower eit|
|00004f90| 68 65 72 20 6f 6e 20 6f | 72 20 6f 66 66 2c 20 64 |her on o|r off, d|
|00004fa0| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 0a 7b 5c 74 74 |epending| on.{\tt|
|00004fb0| 20 6d 6f 64 65 7d 2e 0a | 0a 5c 69 74 65 6d 7b 5c | mode}..|.\item{\|
|00004fc0| 74 74 20 69 6e 74 20 28 | 2a 44 65 76 51 75 65 72 |tt int (|*DevQuer|
|00004fd0| 79 46 72 61 6d 65 29 20 | 28 56 69 64 65 6f 4f 62 |yFrame) |(VideoOb|
|00004fe0| 6a 65 63 74 2a 20 74 68 | 65 4f 62 6a 65 63 74 29 |ject* th|eObject)|
|00004ff0| 7d 0a 0a 50 6f 69 6e 74 | 65 72 20 74 6f 20 66 75 |}..Point|er to fu|
|00005000| 6e 63 74 69 6f 6e 20 74 | 68 61 74 20 61 73 6b 73 |nction t|hat asks|
|00005010| 20 74 68 65 20 70 6c 61 | 79 65 72 20 66 6f 72 20 | the pla|yer for |
|00005020| 74 68 65 20 63 75 72 72 | 65 6e 74 20 61 64 64 72 |the curr|ent addr|
|00005030| 65 73 73 20 6f 66 20 74 | 68 65 0a 6d 65 64 69 75 |ess of t|he.mediu|
|00005040| 6d 2e 20 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |m. Retu|rns the |
|00005050| 61 64 64 72 65 73 73 20 | 69 6e 20 74 65 72 6d 73 |address |in terms|
|00005060| 20 6f 66 20 66 72 61 6d | 65 73 2e 0a 0a 5c 69 74 | of fram|es...\it|
|00005070| 65 6d 7b 5c 74 74 20 69 | 6e 74 20 28 2a 44 65 76 |em{\tt i|nt (*Dev|
|00005080| 51 75 65 72 79 43 68 61 | 70 74 65 72 29 20 28 56 |QueryCha|pter) (V|
|00005090| 69 64 65 6f 4f 62 6a 65 | 63 74 2a 20 74 68 65 4f |ideoObje|ct* theO|
|000050a0| 62 6a 65 63 74 29 7d 0a | 0a 50 6f 69 6e 74 65 72 |bject)}.|.Pointer|
|000050b0| 20 74 6f 20 66 75 6e 63 | 74 69 6f 6e 20 74 68 61 | to func|tion tha|
|000050c0| 74 20 61 73 6b 73 20 74 | 68 65 20 70 6c 61 79 65 |t asks t|he playe|
|000050d0| 72 20 66 6f 72 20 74 68 | 65 20 63 75 72 72 65 6e |r for th|e curren|
|000050e0| 74 20 63 68 61 70 74 65 | 72 20 6f 66 20 74 68 65 |t chapte|r of the|
|000050f0| 0a 6d 65 64 69 75 6d 2e | 20 20 52 65 74 75 72 6e |.medium.| Return|
|00005100| 73 20 74 68 65 20 63 68 | 61 70 74 65 72 20 6e 75 |s the ch|apter nu|
|00005110| 6d 62 65 72 2e 0a 0a 5c | 69 74 65 6d 7b 5c 74 74 |mber...\|item{\tt|
|00005120| 20 69 6e 74 20 28 2a 44 | 65 76 51 75 65 72 79 41 | int (*D|evQueryA|
|00005130| 75 64 69 6f 29 20 28 56 | 69 64 65 6f 4f 62 6a 65 |udio) (V|ideoObje|
|00005140| 63 74 2a 20 74 68 65 4f | 62 6a 65 63 74 29 7d 0a |ct* theO|bject)}.|
|00005150| 0a 50 6f 69 6e 74 65 72 | 20 74 6f 20 66 75 6e 63 |.Pointer| to func|
|00005160| 74 69 6f 6e 20 74 68 61 | 74 20 61 73 6b 73 20 74 |tion tha|t asks t|
|00005170| 68 65 20 70 6c 61 79 65 | 72 20 66 6f 72 20 73 74 |he playe|r for st|
|00005180| 61 74 75 73 20 6f 66 20 | 61 75 64 69 6f 20 6f 75 |atus of |audio ou|
|00005190| 74 70 75 74 2e 0a 52 65 | 74 75 72 6e 73 20 61 75 |tput..Re|turns au|
|000051a0| 64 69 6f 20 73 74 61 74 | 75 73 2e 0a 0a 5c 69 74 |dio stat|us...\it|
|000051b0| 65 6d 7b 5c 74 74 20 69 | 6e 74 20 28 2a 44 65 76 |em{\tt i|nt (*Dev|
|000051c0| 51 75 65 72 79 56 69 64 | 65 6f 29 20 28 56 69 64 |QueryVid|eo) (Vid|
|000051d0| 65 6f 4f 62 6a 65 63 74 | 2a 20 74 68 65 4f 62 6a |eoObject|* theObj|
|000051e0| 65 63 74 29 7d 0a 0a 50 | 6f 69 6e 74 65 72 20 74 |ect)}..P|ointer t|
|000051f0| 6f 20 66 75 6e 63 74 69 | 6f 6e 20 74 68 61 74 20 |o functi|on that |
|00005200| 61 73 6b 73 20 74 68 65 | 20 70 6c 61 79 65 72 20 |asks the| player |
|00005210| 66 6f 72 20 73 74 61 74 | 75 73 20 6f 66 20 76 69 |for stat|us of vi|
|00005220| 64 65 6f 20 6f 75 74 70 | 75 74 2e 0a 52 65 74 75 |deo outp|ut..Retu|
|00005230| 72 6e 73 20 76 69 64 65 | 6f 20 73 74 61 74 75 73 |rns vide|o status|
|00005240| 2e 0a 0a 5c 69 74 65 6d | 7b 5c 74 74 20 69 6e 74 |...\item|{\tt int|
|00005250| 20 28 2a 44 65 76 51 75 | 65 72 79 4d 65 64 69 75 | (*DevQu|eryMediu|
|00005260| 6d 29 20 28 56 69 64 65 | 6f 4f 62 6a 65 63 74 2a |m) (Vide|oObject*|
|00005270| 20 74 68 65 4f 62 6a 65 | 63 74 2c 20 63 68 61 72 | theObje|ct, char|
|00005280| 2a 20 72 65 73 75 6c 74 | 29 7d 0a 0a 50 6f 69 6e |* result|)}..Poin|
|00005290| 74 65 72 20 74 6f 20 66 | 75 6e 63 74 69 6f 6e 20 |ter to f|unction |
|000052a0| 74 68 61 74 20 61 73 6b | 73 20 74 68 65 20 70 6c |that ask|s the pl|
|000052b0| 61 79 65 72 20 66 6f 72 | 20 6d 65 64 69 75 6d 20 |ayer for| medium |
|000052c0| 49 44 2c 20 77 68 65 72 | 65 20 74 68 65 20 6d 65 |ID, wher|e the me|
|000052d0| 64 69 75 6d 0a 69 73 20 | 65 69 74 68 65 72 20 61 |dium.is |either a|
|000052e0| 20 76 69 64 65 6f 74 61 | 70 65 20 6f 72 20 61 20 | videota|pe or a |
|000052f0| 76 69 64 65 6f 64 69 73 | 63 2e 20 20 52 65 74 75 |videodis|c. Retu|
|00005300| 72 6e 73 20 74 68 65 20 | 6d 65 64 69 75 6d 20 49 |rns the |medium I|
|00005310| 44 20 69 66 20 69 6e 74 | 65 67 65 72 2c 0a 6f 72 |D if int|eger,.or|
|00005320| 20 69 66 20 61 20 73 74 | 72 69 6e 67 2c 20 72 65 | if a st|ring, re|
|00005330| 74 75 72 6e 73 20 6d 65 | 64 69 75 6d 20 49 44 20 |turns me|dium ID |
|00005340| 69 6e 20 7b 5c 74 74 20 | 72 65 73 75 6c 74 7d 2c |in {\tt |result},|
|00005350| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 30 2e 0a | and ret|urns 0..|
|00005360| 0a 5c 69 74 65 6d 7b 5c | 74 74 20 69 6e 74 20 28 |.\item{\|tt int (|
|00005370| 2a 44 65 76 51 75 65 72 | 79 53 74 61 74 75 73 29 |*DevQuer|yStatus)|
|00005380| 20 28 56 69 64 65 6f 4f | 62 6a 65 63 74 2a 20 74 | (VideoO|bject* t|
|00005390| 68 65 4f 62 6a 65 63 74 | 29 7d 0a 0a 50 6f 69 6e |heObject|)}..Poin|
|000053a0| 74 65 72 20 74 6f 20 66 | 75 6e 63 74 69 6f 6e 20 |ter to f|unction |
|000053b0| 74 68 61 74 20 61 73 6b | 73 20 74 68 65 20 70 6c |that ask|s the pl|
|000053c0| 61 79 65 72 20 66 6f 72 | 20 69 74 73 20 73 74 61 |ayer for| its sta|
|000053d0| 74 75 73 2c 20 65 67 20 | 70 6c 61 79 2c 20 70 61 |tus, eg |play, pa|
|000053e0| 75 73 65 2c 0a 73 65 61 | 72 63 68 2c 20 65 74 63 |use,.sea|rch, etc|
|000053f0| 2e 0a 0a 5c 69 74 65 6d | 7b 5c 74 74 20 69 6e 74 |...\item|{\tt int|
|00005400| 20 28 2a 44 65 76 50 69 | 6e 67 29 20 28 56 69 64 | (*DevPi|ng) (Vid|
|00005410| 65 6f 4f 62 6a 65 63 74 | 2a 20 74 68 65 4f 62 6a |eoObject|* theObj|
|00005420| 65 63 74 29 7d 0a 0a 50 | 6f 69 6e 74 65 72 20 74 |ect)}..P|ointer t|
|00005430| 6f 20 66 75 6e 63 74 69 | 6f 6e 20 74 68 61 74 20 |o functi|on that |
|00005440| 73 65 6e 64 73 20 61 20 | 63 6f 6d 6d 61 6e 64 20 |sends a |command |
|00005450| 74 6f 20 74 68 65 20 70 | 6c 61 79 65 72 20 74 68 |to the p|layer th|
|00005460| 61 74 20 69 73 0a 67 75 | 61 72 61 6e 74 65 65 64 |at is.gu|aranteed|
|00005470| 20 74 6f 20 65 6c 69 63 | 69 74 20 73 6f 6d 65 20 | to elic|it some |
|00005480| 72 65 73 70 6f 6e 73 65 | 20 66 72 6f 6d 20 74 68 |response| from th|
|00005490| 65 20 70 6c 61 79 65 72 | 2e 20 49 74 20 72 65 74 |e player|. It ret|
|000054a0| 75 72 6e 73 20 74 68 65 | 0a 6e 75 6d 62 65 72 20 |urns the|.number |
|000054b0| 6f 66 20 63 68 61 72 61 | 63 74 65 72 73 20 72 65 |of chara|cters re|
|000054c0| 61 64 2e 20 20 54 68 69 | 73 20 66 75 6e 63 74 69 |ad. Thi|s functi|
|000054d0| 6f 6e 20 69 73 20 75 73 | 65 64 20 6f 6e 6c 79 20 |on is us|ed only |
|000054e0| 64 75 72 69 6e 67 20 74 | 68 65 0a 69 6e 73 74 61 |during t|he.insta|
|000054f0| 6c 6c 61 74 69 6f 6e 20 | 6f 66 20 61 20 64 72 69 |llation |of a dri|
|00005500| 76 65 72 2c 20 62 79 20 | 74 68 65 20 56 69 64 65 |ver, by |the Vide|
|00005510| 6f 20 4c 69 62 72 61 72 | 79 20 66 75 6e 63 74 69 |o Librar|y functi|
|00005520| 6f 6e 20 7b 5c 74 74 0a | 50 6c 61 79 65 72 56 65 |on {\tt.|PlayerVe|
|00005530| 72 69 66 69 65 64 28 29 | 7d 20 73 6f 20 74 68 61 |rified()|} so tha|
|00005540| 74 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |t the ap|plicatio|
|00005550| 6e 20 63 61 6e 20 61 74 | 74 65 6d 70 74 20 74 6f |n can at|tempt to|
|00005560| 20 76 65 72 69 66 79 20 | 74 68 61 74 20 69 66 0a | verify |that if.|
|00005570| 74 68 65 20 70 6c 61 79 | 65 72 20 69 73 20 63 6f |the play|er is co|
|00005580| 72 72 65 63 74 6c 79 20 | 73 65 6c 65 63 74 65 64 |rrectly |selected|
|00005590| 2e 0a 0a 54 68 65 20 76 | 65 72 69 66 69 63 61 74 |...The v|erificat|
|000055a0| 69 6f 6e 20 69 73 20 6e | 6f 74 20 67 75 61 72 61 |ion is n|ot guara|
|000055b0| 6e 74 65 65 64 20 74 6f | 20 62 65 20 66 6f 6f 6c |nteed to| be fool|
|000055c0| 70 72 6f 6f 66 2c 20 62 | 65 63 61 75 73 65 20 61 |proof, b|ecause a|
|000055d0| 20 63 6f 6d 6d 61 6e 64 | 0a 6d 61 79 20 62 65 20 | command|.may be |
|000055e0| 72 65 63 6f 67 6e 69 7a | 65 64 20 62 79 20 6d 61 |recogniz|ed by ma|
|000055f0| 6e 79 20 64 69 66 66 65 | 72 65 6e 74 20 70 6c 61 |ny diffe|rent pla|
|00005600| 79 65 72 73 2e 20 20 54 | 68 65 20 70 72 6f 67 72 |yers. T|he progr|
|00005610| 61 6d 6d 65 72 20 63 61 | 6e 20 6d 61 6b 65 0a 74 |ammer ca|n make.t|
|00005620| 68 65 20 50 69 6e 67 28 | 29 20 66 75 6e 63 74 69 |he Ping(|) functi|
|00005630| 6f 6e 20 6d 6f 72 65 20 | 69 6e 74 65 6c 6c 69 67 |on more |intellig|
|00005640| 65 6e 74 20 62 79 20 72 | 65 74 75 72 6e 69 6e 67 |ent by r|eturning|
|00005650| 20 61 20 70 6f 73 69 74 | 69 76 65 20 6e 75 6d 62 | a posit|ive numb|
|00005660| 65 72 20 6f 66 0a 63 68 | 61 72 61 63 74 65 72 73 |er of.ch|aracters|
|00005670| 20 72 65 61 64 20 6f 6e | 6c 79 20 77 68 65 6e 20 | read on|ly when |
|00005680| 74 68 65 20 72 65 73 70 | 6f 6e 73 65 20 63 6f 72 |the resp|onse cor|
|00005690| 72 65 73 70 6f 6e 64 73 | 20 74 6f 20 77 68 61 74 |responds| to what|
|000056a0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 0a 70 6c 61 | the cur|rent.pla|
|000056b0| 79 65 72 20 77 69 6c 6c | 20 72 65 74 75 72 6e 2e |yer will| return.|
|000056c0| 20 20 54 68 69 73 20 65 | 6c 69 6d 69 6e 61 74 65 | This e|liminate|
|000056d0| 73 20 73 6f 6d 65 20 63 | 61 73 65 73 20 6f 66 20 |s some c|ases of |
|000056e0| 6d 69 73 69 64 65 6e 74 | 69 66 69 63 61 74 69 6f |misident|ificatio|
|000056f0| 6e 2c 0a 62 75 74 20 69 | 73 20 61 67 61 69 6e 20 |n,.but i|s again |
|00005700| 6e 6f 74 20 66 6f 6f 6c | 70 72 6f 6f 66 20 61 6e |not fool|proof an|
|00005710| 64 20 69 74 20 63 61 6e | 20 62 65 20 64 69 66 66 |d it can| be diff|
|00005720| 69 63 75 6c 74 20 74 6f | 20 65 6e 75 6d 65 72 61 |icult to| enumera|
|00005730| 74 65 20 61 6c 6c 0a 70 | 6f 73 73 69 62 6c 65 20 |te all.p|ossible |
|00005740| 72 65 73 70 6f 6e 73 65 | 73 20 69 6e 20 74 68 65 |response|s in the|
|00005750| 20 63 61 73 65 20 6f 66 | 20 73 6f 6d 65 20 64 72 | case of| some dr|
|00005760| 69 76 65 72 73 2e 0a 0a | 0a 5c 69 74 65 6d 7b 5c |ivers...|.\item{\|
|00005770| 74 74 20 69 6e 74 20 28 | 2a 44 65 76 52 65 63 6f |tt int (|*DevReco|
|00005780| 72 64 29 20 28 56 69 64 | 65 6f 4f 62 6a 65 63 74 |rd) (Vid|eoObject|
|00005790| 2a 20 74 68 65 4f 62 6a | 65 63 74 29 7d 0a 0a 50 |* theObj|ect)}..P|
|000057a0| 6f 69 6e 74 65 72 20 74 | 6f 20 66 75 6e 63 74 69 |ointer t|o functi|
|000057b0| 6f 6e 20 74 68 61 74 20 | 62 65 67 69 6e 73 20 6e |on that |begins n|
|000057c0| 6f 72 6d 61 6c 20 72 65 | 63 6f 72 64 69 6e 67 20 |ormal re|cording |
|000057d0| 6f 6e 20 74 68 65 20 70 | 6c 61 79 65 72 2e 20 20 |on the p|layer. |
|000057e0| 49 6e 0a 76 69 64 65 6f | 20 74 65 72 6d 69 6e 6f |In.video| termino|
|000057f0| 6c 6f 67 79 2c 20 74 68 | 69 73 20 69 73 20 6b 6e |logy, th|is is kn|
|00005800| 6f 77 6e 20 61 73 20 22 | 61 73 73 65 6d 62 6c 65 |own as "|assemble|
|00005810| 20 65 64 69 74 22 2e 0a | 0a 5c 69 74 65 6d 7b 5c | edit"..|.\item{\|
|00005820| 74 74 20 69 6e 74 20 28 | 2a 44 65 76 52 65 63 6f |tt int (|*DevReco|
|00005830| 72 64 46 72 6f 6d 54 6f | 29 20 28 56 69 64 65 6f |rdFromTo|) (Video|
|00005840| 4f 62 6a 65 63 74 2a 7e | 74 68 65 4f 62 6a 65 63 |Object*~|theObjec|
|00005850| 74 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t,. | |
|00005860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005870| 20 20 20 20 20 69 6e 74 | 7e 73 74 61 72 74 41 64 | int|~startAd|
|00005880| 64 72 65 73 73 2c 5c 5c | 0a 20 20 20 20 20 20 20 |dress,\\|. |
|00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058a0| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 7e 65 | | int~e|
|000058b0| 6e 64 41 64 64 72 65 73 | 73 73 2c 5c 5c 0a 20 20 |ndAddres|ss,\\. |
|000058c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058e0| 69 6e 74 7e 73 70 65 65 | 64 49 6e 46 72 61 6d 65 |int~spee|dInFrame|
|000058f0| 73 50 65 72 53 65 63 6f | 6e 64 29 7d 0a 0a 0a 50 |sPerSeco|nd)}...P|
|00005900| 6f 69 6e 74 65 72 20 74 | 6f 20 66 75 6e 63 74 69 |ointer t|o functi|
|00005910| 6f 6e 20 74 68 61 74 20 | 72 65 63 6f 72 64 73 20 |on that |records |
|00005920| 61 20 73 65 67 6d 65 6e | 74 20 6f 66 20 76 69 64 |a segmen|t of vid|
|00005930| 65 6f 2c 20 66 72 6f 6d | 20 7b 5c 74 74 0a 73 74 |eo, from| {\tt.st|
|00005940| 61 72 74 41 64 64 72 65 | 73 73 7d 20 74 6f 20 7b |artAddre|ss} to {|
|00005950| 5c 74 74 20 65 6e 64 41 | 64 64 72 65 73 73 7d 2e |\tt endA|ddress}.|
|00005960| 20 20 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 | This f|unction |
|00005970| 69 73 20 75 73 65 64 20 | 66 6f 72 20 69 6e 73 65 |is used |for inse|
|00005980| 72 74 0a 65 64 69 74 69 | 6e 67 2c 20 61 6e 64 20 |rt.editi|ng, and |
|00005990| 69 73 20 63 75 72 72 65 | 6e 74 6c 79 20 75 73 65 |is curre|ntly use|
|000059a0| 64 20 69 6e 20 32 20 64 | 69 66 66 65 72 65 6e 74 |d in 2 d|ifferent|
|000059b0| 20 77 61 79 73 3a 0a 0a | 5c 62 65 67 69 6e 7b 65 | ways:..|\begin{e|
|000059c0| 6e 75 6d 65 72 61 74 65 | 7d 0a 0a 5c 69 74 65 6d |numerate|}..\item|
|000059d0| 7b 73 74 61 72 74 41 64 | 64 72 65 73 73 20 3d 3d |{startAd|dress ==|
|000059e0| 20 4e 55 4c 4c 2c 20 65 | 6e 64 41 64 64 72 65 73 | NULL, e|ndAddres|
|000059f0| 73 20 3d 3d 20 4e 55 4c | 4c 7d 5c 5c 0a 50 75 74 |s == NUL|L}\\.Put|
|00005a00| 73 20 70 6c 61 79 65 72 | 20 69 6e 74 6f 20 22 49 |s player| into "I|
|00005a10| 6e 73 65 72 74 20 45 64 | 69 74 22 20 6d 6f 64 65 |nsert Ed|it" mode|
|00005a20| 2c 20 61 6c 6c 6f 77 69 | 6e 67 20 70 72 65 63 69 |, allowi|ng preci|
|00005a30| 73 65 20 74 69 6d 65 2d | 63 6f 64 65 20 72 65 63 |se time-|code rec|
|00005a40| 6f 72 64 69 6e 67 0a 74 | 6f 20 6f 63 63 75 72 2e |ording.t|o occur.|
|00005a50| 0a 0a 5c 69 74 65 6d 7b | 73 74 61 72 74 41 64 64 |..\item{|startAdd|
|00005a60| 72 65 73 73 20 3d 3d 20 | 30 2c 20 65 6e 64 41 64 |ress == |0, endAd|
|00005a70| 64 72 65 73 73 20 21 3d | 20 30 7d 5c 5c 0a 52 65 |dress !=| 0}\\.Re|
|00005a80| 63 6f 72 64 73 20 66 72 | 6f 6d 20 63 75 72 72 65 |cords fr|om curre|
|00005a90| 6e 74 20 70 6f 73 69 74 | 69 6f 6e 20 28 6e 6f 20 |nt posit|ion (no |
|00005aa0| 73 65 61 72 63 68 29 20 | 75 6e 74 69 6c 20 7b 5c |search) |until {\|
|00005ab0| 74 74 20 65 6e 64 41 64 | 64 72 65 73 73 7d 20 69 |tt endAd|dress} i|
|00005ac0| 73 0a 72 65 61 63 68 65 | 64 2e 0a 0a 5c 65 6e 64 |s.reache|d...\end|
|00005ad0| 7b 65 6e 75 6d 65 72 61 | 74 65 7d 0a 0a 4e 6f 74 |{enumera|te}..Not|
|00005ae0| 65 73 20 6f 6e 20 44 65 | 76 52 65 63 6f 72 64 46 |es on De|vRecordF|
|00005af0| 72 6f 6d 54 6f 3a 0a 0a | 5c 62 65 67 69 6e 7b 65 |romTo:..|\begin{e|
|00005b00| 6e 75 6d 65 72 61 74 65 | 7d 0a 5c 69 74 65 6d 20 |numerate|}.\item |
|00005b10| 0a 41 6c 74 68 6f 75 67 | 68 20 7b 5c 74 74 20 73 |.Althoug|h {\tt s|
|00005b20| 70 65 65 64 49 6e 46 72 | 61 6d 65 73 50 65 72 53 |peedInFr|amesPerS|
|00005b30| 65 63 6f 6e 64 7d 20 66 | 69 65 6c 64 20 69 73 20 |econd} f|ield is |
|00005b40| 68 65 72 65 2c 20 61 73 | 20 77 69 74 68 20 7b 5c |here, as| with {\|
|00005b50| 74 74 0a 44 65 76 50 6c | 61 79 46 72 6f 6d 54 6f |tt.DevPl|ayFromTo|
|00005b60| 28 29 7d 2c 20 69 74 20 | 69 73 20 75 6e 6c 69 6b |()}, it |is unlik|
|00005b70| 65 6c 79 20 74 68 61 74 | 20 70 6c 61 79 65 72 73 |ely that| players|
|00005b80| 20 77 69 6c 6c 20 61 6c | 6c 6f 77 20 72 65 63 6f | will al|low reco|
|00005b90| 72 64 69 6e 67 20 61 74 | 0a 6f 74 68 65 72 20 74 |rding at|.other t|
|00005ba0| 68 61 6e 20 31 78 20 73 | 70 65 65 64 2e 20 20 54 |han 1x s|peed. T|
|00005bb0| 68 69 73 20 66 69 65 6c | 64 20 69 73 20 68 65 72 |his fiel|d is her|
|00005bc0| 65 20 74 6f 20 61 63 63 | 6f 6d 6d 6f 64 61 74 65 |e to acc|ommodate|
|00005bd0| 20 74 68 65 0a 70 6f 73 | 73 69 62 69 6c 69 74 79 | the.pos|sibility|
|00005be0| 20 6f 66 20 66 75 74 75 | 72 65 20 64 65 76 69 63 | of futu|re devic|
|00005bf0| 65 73 20 74 68 61 74 20 | 63 61 6e 20 72 65 63 6f |es that |can reco|
|00005c00| 72 64 20 61 74 20 6f 74 | 68 65 72 20 74 68 61 6e |rd at ot|her than|
|00005c10| 20 6e 6f 72 6d 61 6c 0a | 73 70 65 65 64 2e 0a 0a | normal.|speed...|
|00005c20| 5c 69 74 65 6d 0a 54 6f | 20 64 6f 20 69 6e 73 65 |\item.To| do inse|
|00005c30| 72 74 20 65 64 69 74 69 | 6e 67 20 66 72 6f 6d 2c |rt editi|ng from,|
|00005c40| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 66 72 | for exa|mple, fr|
|00005c50| 61 6d 65 20 31 30 30 20 | 74 6f 20 66 72 61 6d 65 |ame 100 |to frame|
|00005c60| 20 35 30 30 2c 20 75 73 | 65 0a 74 68 65 20 56 69 | 500, us|e.the Vi|
|00005c70| 64 65 6f 4f 62 6a 65 63 | 74 20 62 79 20 66 69 72 |deoObjec|t by fir|
|00005c80| 73 74 20 63 61 6c 6c 69 | 6e 67 20 7b 5c 74 74 0a |st calli|ng {\tt.|
|00005c90| 44 65 76 50 6c 61 79 46 | 72 6f 6d 54 6f 28 74 68 |DevPlayF|romTo(th|
|00005ca0| 65 4f 62 6a 65 63 74 2c | 7e 31 30 30 2c 7e 31 30 |eObject,|~100,~10|
|00005cb0| 30 2c 7e 30 29 7d 2e 20 | 20 4e 65 78 74 2c 20 63 |0,~0)}. | Next, c|
|00005cc0| 61 6c 6c 20 7b 5c 74 74 | 0a 44 65 76 52 65 63 6f |all {\tt|.DevReco|
|00005cd0| 72 64 46 72 6f 6d 54 6f | 28 74 68 65 4f 62 6a 65 |rdFromTo|(theObje|
|00005ce0| 63 74 2c 7e 30 2c 7e 30 | 2c 7e 30 29 7d 20 74 6f |ct,~0,~0|,~0)} to|
|00005cf0| 20 74 75 72 6e 20 6f 6e | 20 74 68 65 20 69 6e 73 | turn on| the ins|
|00005d00| 65 72 74 20 65 64 69 74 | 69 6e 67 0a 66 75 6e 63 |ert edit|ing.func|
|00005d10| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 70 6c 61 79 |tion of |the play|
|00005d20| 65 72 2e 20 20 46 69 6e | 61 6c 6c 79 2c 20 63 61 |er. Fin|ally, ca|
|00005d30| 6c 6c 20 7b 5c 74 74 0a | 44 65 76 52 65 63 6f 72 |ll {\tt.|DevRecor|
|00005d40| 64 46 72 6f 6d 54 6f 28 | 74 68 65 4f 62 6a 65 63 |dFromTo(|theObjec|
|00005d50| 74 2c 7e 30 2c 7e 35 30 | 30 2c 7e 30 29 7d 20 74 |t,~0,~50|0,~0)} t|
|00005d60| 6f 20 64 6f 20 74 68 65 | 20 61 63 74 75 61 6c 20 |o do the| actual |
|00005d70| 72 65 63 6f 72 64 69 6e | 67 2e 0a 0a 49 74 20 77 |recordin|g...It w|
|00005d80| 61 73 20 64 65 63 69 64 | 65 64 20 74 6f 20 73 65 |as decid|ed to se|
|00005d90| 70 61 72 61 74 65 20 74 | 68 65 20 73 65 6d 61 6e |parate t|he seman|
|00005da0| 74 69 63 73 20 6f 66 20 | 70 75 74 74 69 6e 67 20 |tics of |putting |
|00005db0| 61 20 64 65 63 6b 20 69 | 6e 74 6f 20 69 6e 73 65 |a deck i|nto inse|
|00005dc0| 72 74 0a 65 64 69 74 20 | 6d 6f 64 65 20 66 72 6f |rt.edit |mode fro|
|00005dd0| 6d 20 74 68 65 20 73 65 | 6d 61 6e 74 69 63 73 20 |m the se|mantics |
|00005de0| 6f 66 20 61 63 74 75 61 | 6c 6c 79 20 64 6f 69 6e |of actua|lly doin|
|00005df0| 67 20 74 68 65 20 72 65 | 63 6f 72 64 69 6e 67 20 |g the re|cording |
|00005e00| 69 6e 20 6f 72 64 65 72 | 0a 74 6f 20 68 65 6c 70 |in order|.to help|
|00005e10| 20 61 63 68 69 65 76 65 | 20 62 65 74 74 65 72 20 | achieve| better |
|00005e20| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 20 |synchron|ization |
|00005e30| 62 65 74 77 65 65 6e 20 | 70 6c 61 79 62 61 63 6b |between |playback|
|00005e40| 20 61 6e 64 20 72 65 63 | 6f 72 64 0a 64 65 63 6b | and rec|ord.deck|
|00005e50| 73 2e 20 20 53 6f 6d 65 | 20 64 65 76 69 63 65 73 |s. Some| devices|
|00005e60| 20 73 75 66 66 65 72 20 | 61 20 6c 6f 6e 67 20 73 | suffer |a long s|
|00005e70| 65 74 75 70 20 74 69 6d | 65 20 77 68 65 6e 20 72 |etup tim|e when r|
|00005e80| 65 71 75 65 73 74 65 64 | 20 74 6f 20 62 65 20 70 |equested| to be p|
|00005e90| 75 74 0a 69 6e 74 6f 20 | 69 6e 73 65 72 74 20 65 |ut.into |insert e|
|00005ea0| 64 69 74 20 6d 6f 64 65 | 3b 20 62 79 20 73 65 70 |dit mode|; by sep|
|00005eb0| 61 72 61 74 69 6e 67 20 | 74 68 65 20 74 77 6f 20 |arating |the two |
|00005ec0| 66 75 6e 63 74 69 6f 6e | 73 2c 20 61 70 70 6c 69 |function|s, appli|
|00005ed0| 63 61 74 69 6f 6e 0a 70 | 72 6f 67 72 61 6d 6d 65 |cation.p|rogramme|
|00005ee0| 72 73 20 63 61 6e 20 62 | 65 74 74 65 72 20 73 63 |rs can b|etter sc|
|00005ef0| 68 65 64 75 6c 65 20 65 | 64 69 74 69 6e 67 20 66 |hedule e|diting f|
|00005f00| 75 6e 63 74 69 6f 6e 73 | 20 66 6f 72 20 73 79 6e |unctions| for syn|
|00005f10| 63 68 72 6f 6e 69 7a 65 | 64 20 75 73 65 2e 0a 0a |chronize|d use...|
|00005f20| 5c 69 74 65 6d 0a 54 6f | 20 72 65 63 6f 72 64 20 |\item.To| record |
|00005f30| 61 20 73 69 6e 67 6c 65 | 20 66 72 61 6d 65 20 6f |a single| frame o|
|00005f40| 66 20 76 69 64 65 6f 20 | 28 65 2e 67 2e 2c 20 66 |f video |(e.g., f|
|00005f50| 72 61 6d 65 20 31 30 30 | 29 2c 20 63 61 6c 6c 20 |rame 100|), call |
|00005f60| 7b 5c 74 74 0a 44 65 76 | 52 65 63 6f 72 64 46 72 |{\tt.Dev|RecordFr|
|00005f70| 6f 6d 54 6f 28 29 7d 20 | 69 6e 20 74 68 69 73 20 |omTo()} |in this |
|00005f80| 6d 61 6e 6e 65 72 3a 20 | 7b 5c 74 74 0a 44 65 76 |manner: |{\tt.Dev|
|00005f90| 52 65 63 6f 72 64 46 72 | 6f 6d 54 6f 28 74 68 65 |RecordFr|omTo(the|
|00005fa0| 4f 62 6a 65 63 74 2c 7e | 31 30 30 2c 7e 31 30 30 |Object,~|100,~100|
|00005fb0| 2c 7e 33 30 29 7d 2e 0a | 0a 5c 65 6e 64 7b 65 6e |,~30)}..|.\end{en|
|00005fc0| 75 6d 65 72 61 74 65 7d | 0a 0a 5c 65 6e 64 7b 65 |umerate}|..\end{e|
|00005fd0| 6e 75 6d 65 72 61 74 65 | 7d 0a 0a 0a 5c 73 75 62 |numerate|}...\sub|
|00005fe0| 73 65 63 74 69 6f 6e 7b | 53 74 61 74 75 73 20 43 |section{|Status C|
|00005ff0| 6f 64 65 73 20 61 6e 64 | 20 45 72 72 6f 72 20 43 |odes and| Error C|
|00006000| 6f 64 65 73 7d 0a 5c 6c | 61 62 65 6c 7b 53 74 61 |odes}.\l|abel{Sta|
|00006010| 74 75 73 41 6e 64 45 72 | 72 6f 72 43 6f 64 65 73 |tusAndEr|rorCodes|
|00006020| 7d 0a 0a 41 6c 6d 6f 73 | 74 20 61 6c 6c 20 74 68 |}..Almos|t all th|
|00006030| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 62 6f 76 |e functi|ons abov|
|00006040| 65 20 72 65 74 75 72 6e | 20 61 20 73 74 61 74 75 |e return| a statu|
|00006050| 73 20 63 6f 64 65 2e 20 | 54 68 65 73 65 20 63 6f |s code. |These co|
|00006060| 64 65 73 20 61 72 65 0a | 6c 69 73 74 65 64 20 69 |des are.|listed i|
|00006070| 6e 20 7b 5c 74 74 20 50 | 6c 61 79 65 72 53 74 61 |n {\tt P|layerSta|
|00006080| 74 75 73 2e 68 7d 20 73 | 6f 20 74 68 61 74 20 74 |tus.h} s|o that t|
|00006090| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 70 |he appli|cation p|
|000060a0| 72 6f 67 72 61 6d 20 67 | 65 74 73 20 61 0a 75 6e |rogram g|ets a.un|
|000060b0| 69 66 6f 72 6d 20 73 74 | 61 74 75 73 20 63 6f 64 |iform st|atus cod|
|000060c0| 65 20 66 6f 72 20 61 20 | 70 61 72 74 69 63 75 6c |e for a |particul|
|000060d0| 61 72 20 63 6f 6e 64 69 | 74 69 6f 6e 20 61 63 72 |ar condi|tion acr|
|000060e0| 6f 73 73 20 61 6c 6c 20 | 74 68 65 20 64 65 76 69 |oss all |the devi|
|000060f0| 63 65 73 2e 0a 0a 49 66 | 20 79 6f 75 20 61 72 65 |ces...If| you are|
|00006100| 20 77 72 69 74 69 6e 67 | 20 63 6f 64 65 20 74 6f | writing| code to|
|00006110| 20 73 75 70 70 6f 72 74 | 20 61 20 6e 65 77 20 76 | support| a new v|
|00006120| 69 64 65 6f 20 64 65 76 | 69 63 65 2c 20 70 6c 65 |ideo dev|ice, ple|
|00006130| 61 73 65 20 6d 61 6b 65 | 20 73 75 72 65 0a 74 68 |ase make| sure.th|
|00006140| 61 74 20 79 6f 75 20 6d | 61 70 20 77 68 61 74 65 |at you m|ap whate|
|00006150| 76 65 72 20 73 74 61 74 | 75 73 20 63 6f 64 65 73 |ver stat|us codes|
|00006160| 20 79 6f 75 72 20 64 65 | 76 69 63 65 20 72 65 74 | your de|vice ret|
|00006170| 75 72 6e 73 20 69 6e 74 | 6f 20 74 68 65 20 63 6f |urns int|o the co|
|00006180| 6d 6d 6f 6e 0a 73 74 61 | 74 75 73 20 63 6f 64 65 |mmon.sta|tus code|
|00006190| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 7b 5c 74 |s define|d in {\t|
|000061a0| 74 20 50 6c 61 79 65 72 | 53 74 61 74 75 73 2e 68 |t Player|Status.h|
|000061b0| 7d 2e 20 20 54 68 61 74 | 20 77 61 79 2c 20 74 68 |}. That| way, th|
|000061c0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0a 70 72 |e applic|ation.pr|
|000061d0| 6f 67 72 61 6d 6d 65 72 | 20 77 69 6c 6c 20 6f 6e |ogrammer| will on|
|000061e0| 6c 79 20 6e 65 65 64 20 | 74 6f 20 63 6f 64 65 20 |ly need |to code |
|000061f0| 66 6f 72 20 6f 6e 65 20 | 73 65 74 20 6f 66 20 73 |for one |set of s|
|00006200| 74 61 74 75 73 20 63 6f | 64 65 73 2e 0a 0a 53 6f |tatus co|des...So|
|00006210| 6d 65 74 69 6d 65 73 2c | 20 74 68 65 20 64 65 76 |metimes,| the dev|
|00006220| 69 63 65 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |ice will| return |
|00006230| 61 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 2e 20 20 |an error| code. |
|00006240| 49 66 20 79 6f 75 20 61 | 72 65 20 77 72 69 74 69 |If you a|re writi|
|00006250| 6e 67 0a 63 6f 64 65 20 | 74 6f 20 73 75 70 70 6f |ng.code |to suppo|
|00006260| 72 74 20 61 20 6e 65 77 | 20 76 69 64 65 6f 20 64 |rt a new| video d|
|00006270| 65 76 69 63 65 2c 20 79 | 6f 75 20 73 68 6f 75 6c |evice, y|ou shoul|
|00006280| 64 20 77 72 69 74 65 20 | 74 68 65 20 66 75 6e 63 |d write |the func|
|00006290| 74 69 6f 6e 20 77 69 74 | 68 69 6e 0a 74 68 65 20 |tion wit|hin.the |
|000062a0| 64 72 69 76 65 72 20 74 | 68 61 74 20 77 72 69 74 |driver t|hat writ|
|000062b0| 65 73 20 63 6f 6d 6d 61 | 6e 64 73 20 6f 75 74 20 |es comma|nds out |
|000062c0| 74 6f 20 74 68 65 20 73 | 65 72 69 61 6c 20 6c 69 |to the s|erial li|
|000062d0| 6e 65 20 61 6e 64 20 77 | 61 69 74 73 20 66 6f 72 |ne and w|aits for|
|000062e0| 0a 61 63 6b 6e 6f 77 6c | 65 64 67 6d 65 6e 74 73 |.acknowl|edgments|
|000062f0| 20 66 72 6f 6d 20 74 68 | 65 20 73 65 72 69 61 6c | from th|e serial|
|00006300| 20 6c 69 6e 65 20 73 75 | 63 68 20 74 68 61 74 20 | line su|ch that |
|00006310| 69 74 20 61 6c 77 61 79 | 73 20 64 65 74 65 63 74 |it alway|s detect|
|00006320| 73 20 77 68 65 6e 20 61 | 6e 0a 65 72 72 6f 72 20 |s when a|n.error |
|00006330| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 20 20 49 74 |is retur|ned. It|
|00006340| 20 74 68 65 6e 20 73 68 | 6f 75 6c 64 20 64 65 63 | then sh|ould dec|
|00006350| 6f 64 65 20 74 68 65 20 | 65 72 72 6f 72 20 61 6e |ode the |error an|
|00006360| 64 20 65 69 74 68 65 72 | 20 64 69 73 70 6c 61 79 |d either| display|
|00006370| 0a 74 68 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 |.the app|ropriate|
|00006380| 20 65 72 72 6f 72 20 6d | 65 73 73 61 67 65 2c 20 | error m|essage, |
|00006390| 62 79 20 63 61 6c 6c 69 | 6e 67 20 7b 5c 74 74 20 |by calli|ng {\tt |
|000063a0| 44 69 73 70 6c 61 79 45 | 72 72 6f 72 28 29 7d 20 |DisplayE|rror()} |
|000063b0| 6f 72 20 74 61 6b 65 0a | 74 68 65 20 61 70 70 72 |or take.|the appr|
|000063c0| 6f 70 72 69 61 74 65 20 | 63 6f 72 72 65 63 74 69 |opriate |correcti|
|000063d0| 76 65 20 6d 65 61 73 75 | 72 65 73 2e 20 54 68 65 |ve measu|res. The|
|000063e0| 20 65 72 72 6f 72 20 63 | 6f 64 65 20 73 68 6f 75 | error c|ode shou|
|000063f0| 6c 64 20 6e 6f 74 20 62 | 65 0a 72 65 74 75 72 6e |ld not b|e.return|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.